Package com.enhancedechest.model
Enum Class ChestKind
- All Implemented Interfaces:
Serializable,Comparable<ChestKind>,Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionintcode()The integer stored in thekindcolumn.static ChestKindfromCode(int code) Resolves a stored code back to a kind; unknown codes fall back toNORMAL.static ChestKindReturns the enum constant of this class with the specified name.static ChestKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NORMAL
-
TEMP
-
PERM
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
code
public int code()The integer stored in thekindcolumn. -
fromCode
Resolves a stored code back to a kind; unknown codes fall back toNORMAL.
-