AreaEffectCloudDisguise
, ArmorStandDisguise
, BoatDisguise
, FallingBlockDisguise
, ItemDisguise
, MinecartDisguise
public class ObjectDisguise extends Disguise
Disguise.Visibility
Constructor | Description |
---|---|
ObjectDisguise(DisguiseType type) |
Creates an instance.
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.String |
getCustomName() |
Gets the custom name of this entity.
The default value is "" . |
int |
getTypeId() |
Gets the mob type id.
This id is used in the client/server communication. |
static int |
getTypeId(DisguiseType type) |
Gets the mob type id for a given DisguiseType.
This id is used in the client/server communication. |
boolean |
isCustomNameVisible() |
Indicates whether the custom name of this entity is visible all the time.
The default value is true . |
void |
setCustomName(java.lang.String customName) |
Sets the custom name of this entity.
The default value is "" . |
void |
setCustomNameVisible(boolean customNameVisible) |
Sets whether the custom name of this entity is visible all the time.
The default value is true . |
java.lang.String |
toString() |
Returns a string representation of the object.
|
clone, equals, fromString, getType, getVisibility, getVisibilityParameter, hashCode, isVisibleTo, setVisibility, setVisibilityParameter
public ObjectDisguise(DisguiseType type)
type
- the disguise typejava.lang.IllegalArgumentException
- if the given DisguiseType is not an objectpublic java.lang.String getCustomName()
""
.public void setCustomName(java.lang.String customName)
""
.customName
- the custom namepublic boolean isCustomNameVisible()
true
.true
, if the custom name is visible all the timepublic void setCustomNameVisible(boolean customNameVisible)
true
.
This value has no effect if the custom name is empty.customNameVisible
- true
, if the custom name shall be visible all the timepublic java.lang.String toString()
public int getTypeId()
public static int getTypeId(DisguiseType type)
type
- the disguise typejava.lang.IllegalArgumentException
- if the given DisguiseType is not an object