Enum Class StructureAttribute
java.lang.Object
java.lang.Enum<StructureAttribute>
nl.pim16aap2.animatedarchitecture.core.structures.StructureAttribute
- All Implemented Interfaces:
Serializable, Comparable<StructureAttribute>, Constable
Represent the possible attributes of a structure.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAdd an owner.The number of blocks an animated will try to move.Delete the structure.Get the info of the structure.(Un)lock the structure.The open direction of a structure.The open status of a structure.Show a preview of the animation.Relocate the power block.Remove an owner.Sets aPropertyfor a structure.Turns a structure on or off.Toggle the structure. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanAccessWith(PermissionLevel permissionLevel) Checks if a given permission level has access to this attribute.The admin permission node for this attribute.static StringgetAdminPermissionNode(StructureAttribute structureAttribute) Gets the admin permission node for a givenStructureAttribute.The minimum level of ownership required to access an attribute.static List<StructureAttribute> Returns all values in this enum as an unmodifiable list.static StructureAttributeReturns the enum constant of this class with the specified name.static StructureAttribute[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
TOGGLE
Toggle the structure. If it is currently opened, it will be closed. If it is currently closed, it will be opened instead. -
PREVIEW
Show a preview of the animation. -
INFO
Get the info of the structure. -
LOCK
(Un)lock the structure. -
DELETE
Delete the structure. -
ADD_OWNER
Add an owner. -
REMOVE_OWNER
Remove an owner. -
BLOCKS_TO_MOVE
The number of blocks an animated will try to move. -
OPEN_DIRECTION
The open direction of a structure. -
OPEN_STATUS
The open status of a structure. -
RELOCATE_POWERBLOCK
Relocate the power block. -
SET_PROPERTY
Sets aPropertyfor a structure. -
SWITCH
Turns a structure on or off. When on, the structure will rotate until turned off or until the chunks are unloaded.
-
-
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
-
canAccessWith
Checks if a given permission level has access to this attribute.- Parameters:
permissionLevel- The permission level to check.- Returns:
- True if the given permission level has access to this attribute.
-
getValues
Returns all values in this enum as an unmodifiable list.Unlike
values(), this does not create a new object.- Returns:
- All values in this enum as an unmodifiable list.
-
getAdminPermissionNode
Gets the admin permission node for a givenStructureAttribute.Consider using
getAdminPermissionNode()instead, as it uses the cached value.- Parameters:
structureAttribute- TheStructureAttributeto get the admin permission node for.- Returns:
- The admin permission node for the given
StructureAttribute.
-
getPermissionLevel
The minimum level of ownership required to access an attribute. -
getAdminPermissionNode
The admin permission node for this attribute.
-