| Package | Description |
|---|---|
| club.skilldevs.utils.xseries |
| Modifier and Type | Field and Description |
|---|---|
static XMaterial[] |
XMaterial.VALUES
Cached array of
values() to avoid allocating memory for
calling the method every time. |
| Modifier and Type | Method and Description |
|---|---|
static XMaterial |
XMaterial.matchXMaterial(org.bukkit.inventory.ItemStack item)
Parses the given item as an XMaterial using its material and data value (durability)
if not a damageable item
ItemStack.getDurability(). |
static XMaterial |
XMaterial.matchXMaterial(org.bukkit.Material material)
Parses the given material as an XMaterial.
|
static XMaterial |
XMaterial.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static XMaterial[] |
XMaterial.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
| Modifier and Type | Method and Description |
|---|---|
protected static Optional<XMaterial> |
XMaterial.matchDefinedXMaterial(String name,
byte data)
The main method that parses the given material name and data value as an XMaterial.
|
static Optional<XMaterial> |
XMaterial.matchXMaterial(int id,
byte data)
Deprecated.
this method loops through all the available materials and matches their ID using
getId()
which takes a really long time. Plugins should no longer support IDs. If you want, you can make a Map cache yourself.
This method obviously doesn't work for 1.13+ and will not be supported. This is only here for debugging purposes. |
static Optional<XMaterial> |
XMaterial.matchXMaterial(String name)
Parses the given material name as an XMaterial with a given data
value in the string if attached.
|
Copyright © 2022. All rights reserved.