Package me.hsgamer.hscore.minecraft.item
Interface ItemModifier<T>
- Type Parameters:
T- the type of the item
- All Known Subinterfaces:
ItemMetaModifier
- All Known Implementing Classes:
AmountModifier,DurabilityModifier,EnchantmentModifier,ItemFlagModifier,LoreModifier,MaterialModifier,NameModifier,PotionEffectModifier
public interface ItemModifier<T>
The item modifier
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanloadFromItem(T item) Load the modifier from an itemvoidloadFromObject(Object object) Load the modifier from an objectdefault TModify the itemdefault TModify the itemmodify(T original, @Nullable UUID uuid, @NotNull StringReplacer stringReplacer) Modify the itemtoObject()Serialize the modifier to an object
-
Method Details
-
modify
@NotNull T modify(@NotNull T original, @Nullable @Nullable UUID uuid, @NotNull @NotNull StringReplacer stringReplacer) Modify the item- Parameters:
original- the original itemuuid- the unique idstringReplacer- the string replacer- Returns:
- the modified item
-
toObject
Object toObject()Serialize the modifier to an object- Returns:
- the object
-
loadFromObject
Load the modifier from an object- Parameters:
object- the object
-
loadFromItem
Load the modifier from an item- Parameters:
item- the item- Returns:
- true if it can
-
modify
Modify the item- Parameters:
original- the original itemuuid- the unique id- Returns:
- the modified item
-
modify
Modify the item- Parameters:
original- the original item- Returns:
- the modified item
-