Enum Class PlayerQuitEvent.QuitReason

All Implemented Interfaces:
Serializable, Comparable<PlayerQuitEvent.QuitReason>, Constable
Enclosing class:

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


      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.

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

      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.
      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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null