| Constructor and Description |
|---|
ItemData(@NotNull AnnoyingPlugin plugin,
@NotNull org.bukkit.inventory.ItemStack item)
Construct a new
ItemData for the given item stack |
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.lang.String |
attemptItemNbtApi(@NotNull java.util.function.Supplier<java.lang.String> runnable)
Attempt to run the given runnable, and if a
NoClassDefFoundError is thrown, load the RuntimeLibrary.ITEM_NBT_API library and try again. |
@Nullable java.lang.String |
get(@NotNull java.lang.String key)
Get the data value for the given key
|
boolean |
remove(@NotNull java.lang.String key)
Remove the data value with the given key
|
protected boolean |
set(@NotNull java.lang.String key,
@NotNull java.lang.String value)
Set the data value for the given key.
|
get, getAnnoyingPlugin, has, removeChain, sendError, set, setChainpublic ItemData(@NotNull
@NotNull AnnoyingPlugin plugin,
@NotNull
@NotNull org.bukkit.inventory.ItemStack item)
ItemData for the given item stackplugin - Data.pluginitem - Data.target@Nullable
public @Nullable java.lang.String attemptItemNbtApi(@NotNull
@NotNull java.util.function.Supplier<java.lang.String> runnable)
NoClassDefFoundError is thrown, load the RuntimeLibrary.ITEM_NBT_API library and try again. If the error is thrown again, send an error message and return nullrunnable - the runnable to attempt@Nullable
public @Nullable java.lang.String get(@NotNull
@NotNull java.lang.String key)
protected boolean set(@NotNull
@NotNull java.lang.String key,
@NotNull
@NotNull java.lang.String value)