public static enum PlayerQuitEvent.QuitReason extends Enum<PlayerQuitEvent.QuitReason>
Enum Constant and Description |
---|
DISCONNECTED
The player left on their own behalf.
|
ERRONEOUS_STATE
The player's connection has entered an erroneous state.
|
KICKED
The player was kicked from the server.
|
TIMED_OUT
The player has timed out.
|
Modifier and Type | Method and Description |
---|---|
static PlayerQuitEvent.QuitReason |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PlayerQuitEvent.QuitReason[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PlayerQuitEvent.QuitReason DISCONNECTED
This does not mean they pressed the disconnect button in their client, but rather that the client severed the connection themselves. This may occur if no keep-alive packet is received on their side, among other things.
public static final PlayerQuitEvent.QuitReason KICKED
public static final PlayerQuitEvent.QuitReason TIMED_OUT
public static final PlayerQuitEvent.QuitReason ERRONEOUS_STATE
Reasons for this may include invalid packets, invalid data, and uncaught exceptions in the packet handler, among others.
public static PlayerQuitEvent.QuitReason[] values()
for (PlayerQuitEvent.QuitReason c : PlayerQuitEvent.QuitReason.values()) System.out.println(c);
public static PlayerQuitEvent.QuitReason valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2021. All rights reserved.