Class NBTModifier
java.lang.Object
me.hsgamer.hscore.bukkit.item.modifier.NBTModifier
- All Implemented Interfaces:
ItemModifier<org.bukkit.inventory.ItemStack>
The NBT Modifier
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
loadFromObject
(Object object) Load the modifier from an object@NotNull org.bukkit.inventory.ItemStack
modify
(@NotNull org.bukkit.inventory.ItemStack original, UUID uuid, @NotNull StringReplacer stringReplacer) Modify the itemsetNbtData
(String nbtData) Set the NBT datatoObject()
Serialize the modifier to an objectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.hsgamer.hscore.minecraft.item.ItemModifier
loadFromItem, modify, modify
-
Constructor Details
-
NBTModifier
public NBTModifier()
-
-
Method Details
-
setNbtData
Set the NBT data- Parameters:
nbtData
- the NBT data- Returns:
this
for builder chain
-
modify
@NotNull public @NotNull org.bukkit.inventory.ItemStack modify(@NotNull @NotNull org.bukkit.inventory.ItemStack original, UUID uuid, @NotNull @NotNull StringReplacer stringReplacer) Description copied from interface:ItemModifier
Modify the item- Specified by:
modify
in interfaceItemModifier<org.bukkit.inventory.ItemStack>
- Parameters:
original
- the original itemuuid
- the unique idstringReplacer
- the string replacer- Returns:
- the modified item
-
toObject
Description copied from interface:ItemModifier
Serialize the modifier to an object- Specified by:
toObject
in interfaceItemModifier<org.bukkit.inventory.ItemStack>
- Returns:
- the object
-
loadFromObject
Description copied from interface:ItemModifier
Load the modifier from an object- Specified by:
loadFromObject
in interfaceItemModifier<org.bukkit.inventory.ItemStack>
- Parameters:
object
- the object
-