Enum Class PlayerLeaveGameEvent.LeaveReason
java.lang.Object
java.lang.Enum<PlayerLeaveGameEvent.LeaveReason>
dev.itsharshxd.zentrix.api.events.player.PlayerLeaveGameEvent.LeaveReason
- All Implemented Interfaces:
Serializable,Comparable<PlayerLeaveGameEvent.LeaveReason>,Constable
- Enclosing class:
PlayerLeaveGameEvent
Represents the reason a player left a game.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPlayer used a leave command (e.g., /leave).Player was eliminated (died in game).Player was removed due to the game ending.Player was kicked from the game or server.Player was removed for an unknown or other reason.Player disconnected from the server. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static PlayerLeaveGameEvent.LeaveReason[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COMMAND
Player used a leave command (e.g., /leave). -
QUIT
Player disconnected from the server. -
KICK
Player was kicked from the game or server. -
DEATH
Player was eliminated (died in game).Note: This converts the player to a spectator, they don't fully leave unless they also disconnect or use a command.
-
GAME_END
Player was removed due to the game ending. -
OTHER
Player was removed for an unknown or other reason.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-