public class MinecartDisguise 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 |
---|---|
MinecartDisguise() |
Creates an instance.
The default block inside the cart is Material.AIR |
MinecartDisguise(org.bukkit.Material displayedBlock) |
Creates an instance.
|
MinecartDisguise(org.bukkit.Material displayedBlock,
int displayedBlockData) |
Creates an instance.
|
Modifier and Type | Method | Description |
---|---|---|
org.bukkit.Material |
getDisplayedBlock() |
Gets the block displayed inside the cart.
|
int |
getDisplayedBlockData() |
Gets the data of the block inside the cart.
|
void |
setDisplayedBlock(org.bukkit.Material displayedBlock) |
Sets the block to display inside the cart.
This also resets the block data to 0. |
void |
setDisplayedBlockData(int displayedBlockData) |
Sets the data of the block inside the cart.
|
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 MinecartDisguise()
Material.AIR
public MinecartDisguise(org.bukkit.Material displayedBlock)
displayedBlock
- the block to display inside the cartjava.lang.IllegalArgumentException
- if the material is not a blockpublic MinecartDisguise(org.bukkit.Material displayedBlock, int displayedBlockData)
displayedBlock
- the block to display inside the cartdisplayedBlockData
- the data of the block insidejava.lang.IllegalArgumentException
- if the material is not a block, or if data is negative integerpublic org.bukkit.Material getDisplayedBlock()
public void setDisplayedBlock(org.bukkit.Material displayedBlock)
displayedBlock
- the block to display inside the cartjava.lang.IllegalArgumentException
- if the material is not a blockpublic int getDisplayedBlockData()
public void setDisplayedBlockData(int displayedBlockData)
displayedBlockData
- the data valuejava.lang.IllegalArgumentException
- if the given data value is negativepublic java.lang.String toString()
toString
in class ObjectDisguise