java.io.Serializable
, java.lang.Cloneable
MobDisguise
, ObjectDisguise
, PlayerDisguise
public abstract class Disguise
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Class | Description |
---|---|---|
static class |
Disguise.Visibility |
This enum represents the different visibility modes.
|
Modifier and Type | Method | Description |
---|---|---|
Disguise |
clone() |
Creates and returns a copy of this object.
|
boolean |
equals(java.lang.Object object) |
Indicates whether some other object is "equal to" this one.
|
static Disguise |
fromString(java.lang.String string) |
Recreates a disguise from its string representation.
|
DisguiseType |
getType() |
Returns the disguise type
|
Disguise.Visibility |
getVisibility() |
Gets the visibility mode.
|
java.lang.String[] |
getVisibilityParameter() |
Gets the visibility parameters.
|
int |
hashCode() |
Returns a hash code value for this object.
The hash code is obtained by executing disguise.toString().hashCode() |
boolean |
isVisibleTo(org.bukkit.entity.Player player) |
Indicates whether this disguise is visible to a certain player.
|
void |
setVisibility(Disguise.Visibility visibility) |
Sets the visibility mode.
Calling this function will reset the visibility parameters. |
void |
setVisibilityParameter(java.lang.String... visibilityParameter) |
Sets the visibility parameters.
|
java.lang.String |
toString() |
Returns a string representation of the object.
|
public DisguiseType getType()
public Disguise.Visibility getVisibility()
public void setVisibility(Disguise.Visibility visibility)
visibility
- the visibility modepublic java.lang.String[] getVisibilityParameter()
public void setVisibilityParameter(java.lang.String... visibilityParameter)
visibilityParameter
- the visibility parameterspublic boolean isVisibleTo(org.bukkit.entity.Player player)
player
- the viewer to indicate fortrue
in case this disguise is visible to the given player, false
otherwisepublic final Disguise clone()
clone
in class java.lang.Object
public final boolean equals(java.lang.Object object)
equals
in class java.lang.Object
true
if this object is the same as the object
argument; false
otherwisepublic final int hashCode()
disguise.toString().hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static Disguise fromString(java.lang.String string) throws java.lang.IllegalArgumentException, OutdatedServerException
string
- the exact string representation of the disguisejava.lang.IllegalArgumentException
- in case the given string cannot be evaluated to a valid disguiseOutdatedServerException
- in case the Minecraft server does not support the disguise type