| 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 |
|---|---|
void |
attemptItemNbtApi(@NotNull java.lang.Runnable runnable)
If the
RuntimeLibrary.ITEM_NBT_API library isn't loaded, load it. |
@NotNull java.util.Optional<java.lang.String> |
attemptItemNbtApi(@NotNull java.util.function.Supplier<java.lang.String> supplier)
If the
RuntimeLibrary.ITEM_NBT_API library isn't loaded, load it. |
@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, getOptional, 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@NotNull
public @NotNull java.util.Optional<java.lang.String> attemptItemNbtApi(@NotNull
@NotNull java.util.function.Supplier<java.lang.String> supplier)
RuntimeLibrary.ITEM_NBT_API library isn't loaded, load it. Then attempt to run the given supplier and return the resultsupplier - the supplier to attemptpublic void attemptItemNbtApi(@NotNull
@NotNull java.lang.Runnable runnable)
RuntimeLibrary.ITEM_NBT_API library isn't loaded, load it. Then attempt to run the given runnablerunnable - 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)