public interface ReadWriteItemNBT extends ReadWriteNBT, ReadableItemNBT
| Modifier and Type | Method and Description |
|---|---|
void |
clearCustomNBT()
Remove all custom (non-vanilla) NBT tags from the NBTItem.
|
boolean |
hasCustomNbtData()
True, if the item has any tags now known for this item type.
|
void |
modifyMeta(BiConsumer<ReadableNBT,org.bukkit.inventory.meta.ItemMeta> handler)
Gives save access to the
ItemMeta of the internal ItemStack. |
<T extends org.bukkit.inventory.meta.ItemMeta> |
modifyMeta(Class<T> type,
BiConsumer<ReadableNBT,T> handler)
Gives save access to the
ItemMeta of the internal ItemStack. |
clearNBT, getCompound, getCompoundList, getDoubleList, getFloatList, getIntArrayList, getIntegerList, getLongList, getOrCreateCompound, getStringList, getUUIDList, mergeCompound, removeKey, resolveCompound, resolveOrCreateCompound, set, setBoolean, setByte, setByteArray, setDouble, setEnum, setFloat, setIntArray, setInteger, setItemStack, setItemStackArray, setLong, setLongArray, setShort, setString, setUUIDhasNBTDataextractDifference, get, getBoolean, getByte, getByteArray, getDouble, getEnum, getFloat, getIntArray, getInteger, getItemStack, getItemStackArray, getKeys, getListType, getLong, getLongArray, getOrDefault, getOrNull, getShort, getString, getType, getUUID, hasTag, hasTag, resolveOrDefault, resolveOrNull, toString, writeCompoundboolean hasCustomNbtData()
void clearCustomNBT()
void modifyMeta(BiConsumer<ReadableNBT,org.bukkit.inventory.meta.ItemMeta> handler)
ItemMeta of the internal ItemStack.
Supported operations while inside this scope: - any get/set method of
ItemMeta - any getter on NBTItem
All changes made to the NBTItem during this scope will be reverted at
the end.handler - <T extends org.bukkit.inventory.meta.ItemMeta> void modifyMeta(Class<T> type, BiConsumer<ReadableNBT,T> handler)
ItemMeta of the internal ItemStack.
Supported operations while inside this scope: - any get/set method of
ItemMeta - any getter on NBTItem
All changes made to the NBTItem during this scope will be reverted at
the end.handler - Copyright © 2015–2025 tr7zw. All rights reserved.