Enum Class CloseReason

java.lang.Object
java.lang.Enum<CloseReason>
tech.guilhermekaua.spigotboot.inventoryapi.context.CloseReason
All Implemented Interfaces:
Serializable, Comparable<CloseReason>, Constable

public enum CloseReason extends Enum<CloseReason>
Why a session closed; exposed through CloseContext.reason().
  • Enum Constant Details

    • PLAYER

      public static final CloseReason PLAYER
      The player closed the container themselves (e.g. pressed Esc).
    • API

      public static final CloseReason API
      ViewService.close or ViewContext.close() was called.
    • REPLACED

      public static final CloseReason REPLACED
      Another view was opened for the same player, replacing this session.
    • DISCONNECT

      public static final CloseReason DISCONNECT
      The player disconnected.
    • PLUGIN_DISABLE

      public static final CloseReason PLUGIN_DISABLE
      The owning plugin is being disabled.
    • OPEN_FAILED

      public static final CloseReason OPEN_FAILED
      onFirstRender threw and the open was aborted before the container was shown.
  • Method Details

    • values

      public static CloseReason[] 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 CloseReason 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