Enum KickReason
- All Implemented Interfaces:
Serializable
,Comparable<KickReason>
,java.lang.constant.Constable
Used by inter alia Arena.kickPlayer(org.bukkit.entity.Player, KickReason)
and
PlayerQuitArenaEvent.getReason()
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionArena is being stoppedDeprecated.AddRemotePlayerInfo.setForcefully(boolean)
forced him to switch to another arenaPlayer got kicked as the game ended (e.g. postArenaStatus.END_LOBBY
phase)Player died ingame while his bed was brokenPlayer got kicked by e.g.Player left the arenaPlayer got kicked during lobby phase as someone with a higher role wants to join the full arenaA party plugin caused the player to switch from one arena to anotherA plugin has kicked the playerServer/plugin is about to stop or to be reloadedPlayer wants to spectate, even though he is still a part of match, whereby he gets kicked from the running matchPlayer used theSpectatorItemHandlerType.NEXT_ROUND
itemVoting has ended and player got moved to the new arena -
Method Summary
Modifier and TypeMethodDescriptionThe used reason for when a playing spectator gets kicked.boolean
Get whether the player's stored inventory does get applied with this reason.boolean
Get whether the player is being teleported to the hub with this reason.static KickReason
Returns the enum constant of this type with the specified name.static KickReason[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
LEAVE
Player left the arena -
KICK
Player got kicked by e.g. /bw kick -
ARENA_STOP
Arena is being stopped -
PLUGIN_STOP
Server/plugin is about to stop or to be reloaded -
GAME_LOSE
Player died ingame while his bed was broken -
GAME_END
Player got kicked as the game ended (e.g. postArenaStatus.END_LOBBY
phase) -
LOBBY_NEED_SLOT
Player got kicked during lobby phase as someone with a higher role wants to join the full arena -
VOTING_SWITCH_ARENA
Voting has ended and player got moved to the new arena -
PARTY_SWITCH_ARENA
A party plugin caused the player to switch from one arena to another -
FORCE_SWITCH_ARENA
AddRemotePlayerInfo.setForcefully(boolean)
forced him to switch to another arena -
SPECTATE
Player wants to spectate, even though he is still a part of match, whereby he gets kicked from the running match -
SPECTATE_ITEM_NEXT_ROUND
Player used theSpectatorItemHandlerType.NEXT_ROUND
item -
DEBUG
Deprecated.Doesn't eliminate the team and doesn't stop the game. Only for debugging purposes. -
PLUGIN
A plugin has kicked the player
-
-
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
-
getMatchingSpectatorKickReason
The used reason for when a playing spectator gets kicked.It is possible for players to be spectators and regular players at the same time (e.g. during death spectate). In case the player gets kicked (using e.g.
Arena.kickPlayer(Player)
), the spectating instance gets kicked as well. The matchingKickSpectatorReason
gets obtained using this method.- Returns:
- Used spectator kick reason when the player gets kicked
-
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
-
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
-