Enum Class PlayerQuitEvent.QuitReason

java.lang.Object
java.lang.Enum<PlayerQuitEvent.QuitReason>
org.bukkit.event.player.PlayerQuitEvent.QuitReason
All Implemented Interfaces:
Serializable, Comparable<PlayerQuitEvent.QuitReason>, Constable
Enclosing class:
PlayerQuitEvent

public static enum PlayerQuitEvent.QuitReason extends Enum<PlayerQuitEvent.QuitReason>
  • Enum Constant Details

    • DISCONNECTED

      public static final PlayerQuitEvent.QuitReason DISCONNECTED
      The player left on their own behalf.

      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.

    • KICKED

      public static final PlayerQuitEvent.QuitReason KICKED
      The player was kicked from the server.
    • TIMED_OUT

      public static final PlayerQuitEvent.QuitReason TIMED_OUT
      The player has timed out.
    • ERRONEOUS_STATE

      public static final PlayerQuitEvent.QuitReason ERRONEOUS_STATE
      The player's connection has entered an erroneous state.

      Reasons for this may include invalid packets, invalid data, and uncaught exceptions in the packet handler, among others.

  • Method Details

    • values

      public static PlayerQuitEvent.QuitReason[] 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

      public static PlayerQuitEvent.QuitReason valueOf(String name)
      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 name
      NullPointerException - if the argument is null