public class FallingBlockDisguise 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 |
---|---|
FallingBlockDisguise() |
Creates an instance.
The default material is Material.STONE |
FallingBlockDisguise(org.bukkit.Material material) |
Creates an instance.
|
FallingBlockDisguise(org.bukkit.Material material,
int data) |
Creates an instance.
|
FallingBlockDisguise(org.bukkit.Material material,
int data,
boolean onlyBlockCoordinates) |
Creates an instance.
|
Modifier and Type | Method | Description |
---|---|---|
int |
getData() |
Gets the block data.
|
org.bukkit.Material |
getMaterial() |
Gets the material.
|
boolean |
onlyBlockCoordinates() |
Indicates whether this disguise may appear only on block coordinates.
|
void |
setData(int data) |
Sets the block data.
|
void |
setMaterial(org.bukkit.Material material) |
Sets the material.
This also resets the data to 0. |
void |
setOnlyBlockCoordinates(boolean onlyBlockCoordinates) |
Sets whether this disguise may appear only on block coordinates.
|
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 FallingBlockDisguise()
Material.STONE
public FallingBlockDisguise(org.bukkit.Material material)
material
- the materialjava.lang.IllegalArgumentException
- if the material is not a blockpublic FallingBlockDisguise(org.bukkit.Material material, int data)
material
- the materialdata
- the block datajava.lang.IllegalArgumentException
- if the material is not a block, or if the data is negativepublic FallingBlockDisguise(org.bukkit.Material material, int data, boolean onlyBlockCoordinates)
material
- the materialdata
- the block dataonlyBlockCoordinates
- makes the disguise appear on block coordinates only, so it looks like an actual block that you can't targetjava.lang.IllegalArgumentException
- if the material is not a block, or if the data is negativepublic org.bukkit.Material getMaterial()
public void setMaterial(org.bukkit.Material material)
material
- the materialjava.lang.IllegalArgumentException
- if the material is not a blockpublic int getData()
public void setData(int data)
data
- the block datapublic boolean onlyBlockCoordinates()
true
, if this disguise may appear only on block coordinatespublic void setOnlyBlockCoordinates(boolean onlyBlockCoordinates)
onlyBlockCoordinates
- makes this disguise appear on block coordinates onlypublic java.lang.String toString()
toString
in class ObjectDisguise