Enum Class ChestKind

java.lang.Object
java.lang.Enum<ChestKind>
com.enhancedechest.model.ChestKind
All Implemented Interfaces:
Serializable, Comparable<ChestKind>, Constable

public enum ChestKind extends Enum<ChestKind>
Whether an ender chest is a permanent ("normal") chest, a transient overflow ("temp") chest, or a permission-granted chest.

NORMAL chests are the ones players create and manage; they may carry an optional expiry when granted with a duration. TEMP chests are created automatically when items spill out of a chest that is shrunk, deleted or expired; they always carry an expiry and disappear once emptied. PERM chests are granted/removed automatically from permissions (enhancedechest.additional_amount.<count>.slot.<size>); to a player they behave exactly like a NORMAL chest (open/rename/icon/set-main), but admin commands never touch them.

  • Enum Constant Details

  • Method Details

    • values

      public static ChestKind[] 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 ChestKind 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
    • code

      public int code()
      The integer stored in the kind column.
    • fromCode

      public static ChestKind fromCode(int code)
      Resolves a stored code back to a kind; unknown codes fall back to NORMAL.