public enum DisguiseType extends java.lang.Enum<DisguiseType>
Modifier and Type | Class | Description |
---|---|---|
static class |
DisguiseType.Matcher |
Deprecated.
Replaced by
fromString(String) . |
static class |
DisguiseType.Type |
The type a disguise can be: mob, player, object.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
addCustomCommandArgument(java.lang.String customCommandArgument) |
Adds another custom command argument.
This command argument will NOT be shown when /disguise help is executed. |
static DisguiseType |
fromEntityType(org.bukkit.entity.EntityType entityType) |
Match a disguise type from the equivalent entity type.
|
static DisguiseType |
fromString(java.lang.String commandArgument) |
Match a disguise type from one of its registered command arguments.
Notice: This operation is case-insensitive. |
java.lang.String |
getCustomCommandArgument() |
Gets the custom (probably translated) command argument.
The custom command argument may be set via setCustomCommandArgument(String) .This command argument is shown whenever /disguise help is run. |
java.lang.String |
getDefaultCommandArgument() |
Gets the default (english) command argument.
Calling this method is similar to: type.name().toLowerCase(Locale.ENGLISH).replace('_', '-') |
java.lang.Class<? extends Disguise> |
getDisguiseClass() |
Returns the class that handles the subtypes for this disguise type.
|
java.lang.String |
getNMSClass() |
|
DisguiseType.Type |
getType() |
Returns the type of this disguise type.
|
boolean |
isAvailable() |
Indicates whether this disguise type is available on this server.
|
boolean |
isMob() |
Checks whether the type is a mob.
|
boolean |
isObject() |
Checks whether the type is an object.
|
boolean |
isPlayer() |
Checks whether the type is a player.
|
Disguise |
newInstance() |
Creates and returns a new instance of the correspondent disguise class.
This is not supported for PLAYER . |
static DisguiseType |
random(DisguiseType.Type type) |
Creates a random disguise type.
|
boolean |
setCustomCommandArgument(java.lang.String customCommandArgument) |
Sets the custom command argument.
This command argument is shown whenever /disguise help is executed. |
java.lang.String |
toString() |
Returns a string representation of the object.
|
static DisguiseType |
valueOf(java.lang.String name) |
Returns the enum constant of this type with the specified name.
|
static DisguiseType[] |
values() |
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DisguiseType BAT
public static final DisguiseType BLAZE
public static final DisguiseType CAVE_SPIDER
public static final DisguiseType CHICKEN
public static final DisguiseType COW
public static final DisguiseType CREEPER
public static final DisguiseType DONKEY
public static final DisguiseType ELDER_GUARDIAN
public static final DisguiseType ENDER_DRAGON
public static final DisguiseType ENDERMAN
public static final DisguiseType ENDERMITE
public static final DisguiseType EVOKER
public static final DisguiseType GHAST
public static final DisguiseType GIANT
public static final DisguiseType GUARDIAN
public static final DisguiseType HORSE
public static final DisguiseType HUSK
public static final DisguiseType ILLUSIONER
public static final DisguiseType IRON_GOLEM
public static final DisguiseType LLAMA
public static final DisguiseType MAGMA_CUBE
public static final DisguiseType MULE
public static final DisguiseType MUSHROOM_COW
public static final DisguiseType OCELOT
public static final DisguiseType PARROT
public static final DisguiseType PIG
public static final DisguiseType PIG_ZOMBIE
public static final DisguiseType POLAR_BEAR
public static final DisguiseType RABBIT
public static final DisguiseType SHEEP
public static final DisguiseType SHULKER
public static final DisguiseType SILVERFISH
public static final DisguiseType SKELETAL_HORSE
public static final DisguiseType SKELETON
public static final DisguiseType SLIME
public static final DisguiseType SNOWMAN
public static final DisguiseType SPIDER
public static final DisguiseType SQUID
public static final DisguiseType STRAY
public static final DisguiseType UNDEAD_HORSE
public static final DisguiseType VEX
public static final DisguiseType VILLAGER
public static final DisguiseType VINDICATOR
public static final DisguiseType WITCH
public static final DisguiseType WITHER
public static final DisguiseType WITHER_SKELETON
public static final DisguiseType WOLF
public static final DisguiseType ZOMBIE
public static final DisguiseType ZOMBIE_VILLAGER
public static final DisguiseType PLAYER
public static final DisguiseType AREA_EFFECT_CLOUD
public static final DisguiseType ARMOR_STAND
public static final DisguiseType BOAT
public static final DisguiseType ENDER_CRYSTAL
public static final DisguiseType FALLING_BLOCK
public static final DisguiseType ITEM
public static final DisguiseType MINECART
public static DisguiseType[] values()
for (DisguiseType c : DisguiseType.values()) System.out.println(c);
public static DisguiseType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic boolean isMob()
public boolean isPlayer()
public boolean isObject()
public DisguiseType.Type getType()
public boolean isAvailable()
true
, if and only if this disguise type is availablepublic java.lang.Class<? extends Disguise> getDisguiseClass()
public Disguise newInstance()
PLAYER
.null
, if the instantiation failedjava.lang.UnsupportedOperationException
- if the type is PLAYER
public java.lang.String getNMSClass()
public java.lang.String getDefaultCommandArgument()
type.name().toLowerCase(Locale.ENGLISH).replace('_', '-')
public java.lang.String getCustomCommandArgument()
setCustomCommandArgument(String)
.public boolean setCustomCommandArgument(java.lang.String customCommandArgument)
false
in case the given command argument is already registeredpublic boolean addCustomCommandArgument(java.lang.String customCommandArgument)
false
in case the given command argument is already registeredpublic java.lang.String toString()
toString
in class java.lang.Enum<DisguiseType>
public static DisguiseType fromString(java.lang.String commandArgument)
null
if the given command argument is not registeredpublic static DisguiseType fromEntityType(org.bukkit.entity.EntityType entityType)
null
if there is no equivalentpublic static DisguiseType random(DisguiseType.Type type)
type
- the type the disguise type should be, if this is null the type is ignored