Enum SpectateReason
- All Implemented Interfaces:
Serializable
,Comparable<SpectateReason>
,java.lang.constant.Constable
Reasons or causes for someone spectating
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionPlayer used the "join a random arena" item as a spectator, but failed and reentered as a spectatorPlayer died and is temporarily a spectatorPlayer entered manuallyPlayer is a member of a party and followed its leader.Player entered as a spectator to watch another person play using the 'locate player' command.Player lost and is now watching the gameA plugin made him into a spectator -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get whether a back up of the player's inventory is being created in this reason.boolean
Get whether the join message shall be sent to the player with this reason.static SpectateReason
Returns the enum constant of this type with the specified name.static SpectateReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
ENTER
Player entered manually -
LOSE
Player lost and is now watching the game -
DEATH
Player died and is temporarily a spectator -
ARENA_CHANGE_FAILED
Player used the "join a random arena" item as a spectator, but failed and reentered as a spectator -
FOLLOW_PARTY
Player is a member of a party and followed its leader. However, the match is already running, whereby he's spectating instead. -
LOCATE_PLAYER
Player entered as a spectator to watch another person play using the 'locate player' command. -
PLUGIN
A plugin made him into a spectator
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isBackingUpInventory
public boolean isBackingUpInventory()Get whether a back up of the player's inventory is being created in this reason.Depending on the server's configuration, the players inventory is being backed up before he spectates an arena. And when he leaves, it is possibly being applied again.
- Returns:
- If a backup is being created of the player's inventory
-
isDisplayingJoinMessage
public boolean isDisplayingJoinMessage()Get whether the join message shall be sent to the player with this reason.It might not be neccessary to display the join message (Spectator_Join) in some cases.
- Returns:
- Whether the join message shall be sent with this reason
-