public class ItemAttributes
extends java.lang.Object
Constructor and Description |
---|
ItemAttributes()
Constructor:
Generates a new instance with an empty NBT tag list.
|
Modifier and Type | Method and Description |
---|---|
void |
addModifier(AttributeModifier modifier)
Add an modifier to this set of attribute modifiers for an item.
|
org.bukkit.inventory.ItemStack |
apply(org.bukkit.inventory.ItemStack item)
Apply this set of attribute modifiers on an item.
|
void |
getFromStack(org.bukkit.inventory.ItemStack item)
Get all attribute modifiers out of an item.
|
java.util.List<AttributeModifier> |
getModifiers()
Get all modifiers in this set of attribute modifiers.
|
java.lang.String |
getVersion()
Get the version of this API Library
|
void |
removeModifier(AttributeModifier modifier)
Iterates over all Modifiers and removes all equals like the given modifier.
|
void |
removeModifier(int i)
Remove an prior added modifier from this set of attribute modifiers.
|
public ItemAttributes()
public void addModifier(AttributeModifier modifier)
modifier
- The modifier, that should be addedpublic void removeModifier(int i)
i
- The index of the modifier, that should be removedpublic void removeModifier(AttributeModifier modifier)
modifier
- The modifier, that should be removedpublic java.util.List<AttributeModifier> getModifiers()
public org.bukkit.inventory.ItemStack apply(org.bukkit.inventory.ItemStack item)
item
- The item, on which the modifiers should be addedpublic void getFromStack(org.bukkit.inventory.ItemStack item)
item
- The item where the modifiers should be read outpublic java.lang.String getVersion()