public interface Item
extends java.lang.Cloneable
Modifier and Type | Method and Description |
---|---|
void |
addProperty(java.lang.String key,
ItemProperty property)
Add some property for this item
|
org.bukkit.inventory.ItemStack |
build(org.bukkit.entity.Player player,
Menu menu)
Build ItemStack of this item
|
Item |
clone()
Clone this item
|
java.util.Map<java.lang.String,ItemProperty> |
getProperties()
Get properties if the item
|
boolean |
isSimilar(org.bukkit.inventory.ItemStack item,
org.bukkit.entity.Player player)
Check is this item similar to som ItemStack
|
ItemProperty |
removeProperty(java.lang.String key)
Remove property from item
|
void |
setProperties(java.util.Map<java.lang.String,ItemProperty> properties)
Set new or replace all properties for this item
|
java.util.Map<java.lang.String,ItemProperty> getProperties()
void addProperty(java.lang.String key, ItemProperty property)
key
- Property keyproperty
- Item propertyvoid setProperties(java.util.Map<java.lang.String,ItemProperty> properties)
properties
- Properties mapItemProperty removeProperty(java.lang.String key)
key
- Key (name) of the property. This key you specify in item block in menu fileboolean isSimilar(org.bukkit.inventory.ItemStack item, org.bukkit.entity.Player player)
item
- Bukkit ItemStackplayer
- Player to replace placeholdersorg.bukkit.inventory.ItemStack build(org.bukkit.entity.Player player, Menu menu)
player
- Player to correct replace all placeholdersmenu
- Menu in which this item exists. Might be nullItem clone()