Enum Class CloseReason

java.lang.Object
java.lang.Enum<CloseReason>
io.github.rysefoxx.inventory.plugin.enums.CloseReason
All Implemented Interfaces:
Serializable, Comparable<CloseReason>, Constable

public enum CloseReason extends Enum<CloseReason>
  • Enum Constant Details

    • CLICK_OUTSIDE

      public static final CloseReason CLICK_OUTSIDE
      When the player clicks outside the inventory.
    • CLICK_EMPTY_SLOT

      public static final CloseReason CLICK_EMPTY_SLOT
      When the player clicks an empty slot in the upper inventory.
    • CLICK_BOTTOM_INVENTORY

      public static final CloseReason CLICK_BOTTOM_INVENTORY
      When the player clicks an slot in the lower inventory.
  • 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
    • fromName

      @Nullable public static @Nullable CloseReason fromName(@NotNull @NotNull String name)
      Return the first CloseReason whose name matches the given name, or null if no such CloseReason exists.
      Parameters:
      name - The name of the enum constant, exactly as declared in its enum declaration.
      Returns:
      A CloseReason enum value.