public class ItemDisguise extends ObjectDisguise
Disguise.Visibility
Modifier and Type | Field | Description |
---|---|---|
static java.util.Set<org.bukkit.Material> |
INVALID_MATERIALS |
A set containing all invalid materials.
These materials are invalid because the associated disguise would be invisible. |
Constructor | Description |
---|---|
ItemDisguise() |
Creates an instance.
The default item stack is one stone. |
ItemDisguise(org.bukkit.inventory.ItemStack itemStack) |
Creates an instance.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getAmount() |
Gets the amount.
|
int |
getData() |
Gets the data value.
|
org.bukkit.inventory.ItemStack |
getItemStack() |
Gets the displayed item stack.
|
org.bukkit.Material |
getMaterial() |
Gets the material.
|
boolean |
isEnchanted() |
Indicates whether the associated item stack of this disguise contains any enchantments.
|
void |
setAmount(int amount) |
Sets the amount.
|
void |
setData(int data) |
Sets the data value.
|
void |
setEnchanted(boolean enchanted) |
Sets whether this item disguise appears enchanted.
|
void |
setItemStack(org.bukkit.inventory.ItemStack itemStack) |
Sets the displayed item stack.
|
void |
setMaterial(org.bukkit.Material material) |
Sets the material.
This also resets the data. |
java.lang.String |
toString() |
Returns a string representation of the object.
|
clone, equals, fromString, getType, getVisibility, getVisibilityParameter, hashCode, isVisibleTo, setVisibility, setVisibilityParameter
getCustomName, getTypeId, getTypeId, isCustomNameVisible, setCustomName, setCustomNameVisible
public static final java.util.Set<org.bukkit.Material> INVALID_MATERIALS
public ItemDisguise()
public ItemDisguise(org.bukkit.inventory.ItemStack itemStack)
itemStack
- the displayed item stackjava.lang.IllegalArgumentException
- if the item stack is null
public org.bukkit.inventory.ItemStack getItemStack()
public void setItemStack(org.bukkit.inventory.ItemStack itemStack)
itemStack
- the displayed item stackjava.lang.IllegalArgumentException
- if the item stack is nullpublic org.bukkit.Material getMaterial()
public void setMaterial(org.bukkit.Material material)
material
- the materialpublic int getData()
public void setData(int data)
data
- the data valuepublic int getAmount()
public void setAmount(int amount)
amount
- the amountpublic boolean isEnchanted()
true
, if and only if the item stack contains any enchantmentspublic void setEnchanted(boolean enchanted)
enchanted
- true
means enchantedpublic java.lang.String toString()
toString
in class ObjectDisguise