Enum KickSpectatorReason
- All Implemented Interfaces:
Serializable
,Comparable<KickSpectatorReason>
,java.lang.constant.Constable
Reasons or causes why a player stopped spectating
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionArena stoppedPlayer used the "next arena" itemPlayer was only temporarily a spectator because he died.The match ended and players that died during the match - thus become spectators - get re-added to the end lobby.Player is a member of a party and the party leader entered an arena.AddRemotePlayerInfo.setForcefully(boolean)
forced him to switch to another arena.He joined an arena (e.g. with /bw join).Player has been kickedPlayer manually left the arenaA plugin kicked himServer/plugin is about to stop or to be reloaded -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get whether the player's stored inventory does get applied with this reason.boolean
Get whether the leave message shall be sent to the player with this reason.boolean
Get whether the player is being teleported to the hub with this reason.static KickSpectatorReason
Returns the enum constant of this type with the specified name.static KickSpectatorReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LEAVE
Player manually left the arena -
ARENA_STOP
Arena stopped -
PLUGIN_STOP
Server/plugin is about to stop or to be reloaded -
KICK
Player has been kicked -
CHANGE_ARENA
Player used the "next arena" item -
DEATH_RESPAWN
Player was only temporarily a spectator because he died. He respawned now -
FOLLOW_PARTY
Player is a member of a party and the party leader entered an arena. Player is now leaving the Spectating mode to enter his arena. -
FORCE_SWITCH_ARENA
AddRemotePlayerInfo.setForcefully(boolean)
forced him to switch to another arena. -
END_LOBBY
The match ended and players that died during the match - thus become spectators - get re-added to the end lobby.- See Also:
-
JOIN_ARENA
He joined an arena (e.g. with /bw join). -
PLUGIN
A plugin kicked him
-
-
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
-
isTeleportingToHub
public boolean isTeleportingToHub()Get whether the player is being teleported to the hub with this reason.It may not neccessary, or might even cause bugs, if the player would get teleported in these scenarios.
Note that other factors
- Returns:
- Whether the player would get teleported with this reason
-
isApplyingStoredInventory
public boolean isApplyingStoredInventory()Get whether the player's stored inventory does get applied with 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. This might not happen every time, as this could possibly cause bugs.
- Returns:
- Whether the player's backed up inventory would get applied again
-
isDisplayingLeaveMessage
public boolean isDisplayingLeaveMessage()Get whether the leave message shall be sent to the player with this reason.It might not be neccessary to display the leave message (Spectator_Leave) in some cases.
- Returns:
- Whether the leave message shall be sent with this reason
-