Enum Class StructureToggleResult
java.lang.Object
java.lang.Enum<StructureToggleResult>
nl.pim16aap2.animatedarchitecture.core.structures.StructureToggleResult
- All Implemented Interfaces:
Serializable,Comparable<StructureToggleResult>,Constable
Represent the possible outcomes of trying to toggle a structure.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTheStructurecould not be closed because it is already closed.TheStructurecould not be opened because it is already open.TheStructurecould not be toggled because it is already 'busy': i.e. it is currently moving.TheStructurecould not be toggled because it was cancelled.TheStructurecould not be toggled because it could not find the target coordinates to move to.Called when trying to skip an animation for a type of structure that does not support skipping animations.TheStructurecould not be toggled because it was requested to skip an animation that cannot be skipped.Some undefined error occurred while attempting to toggle thisStructure.The exact instance of theStructurethat is to be toggled isn't registered in theStructureRegistry.TheStructurecould not be toggled because it is locked.The structure could not be opened/closed because it does not haveProperty.OPEN_STATUS.TheStructuredid not have enough space to move.The player who tried to toggle it or, if not present (e.g. when toggled via redstone"), the original creator does not have permission to open to toggle theStructurebecause they are not allowed to break blocks in the new location.NoStructures were found, so none were toggled.An attempt to toggle (or open/close) aStructurefailed because it was obstructed.No issues were encountered; everything went fine.TheStructureexceeded the size limit.TheStructurecould not be toggled because its type was disabled at compile time. -
Method Summary
Modifier and TypeMethodDescriptionstatic StructureToggleResultReturns the enum constant of this class with the specified name.static StructureToggleResult[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SUCCESS
No issues were encountered; everything went fine. -
NO_STRUCTURES_FOUND
NoStructures were found, so none were toggled. -
BUSY
TheStructurecould not be toggled because it is already 'busy': i.e. it is currently moving. -
LOCKED
TheStructurecould not be toggled because it is locked. -
ERROR
Some undefined error occurred while attempting to toggle thisStructure. -
MISSING_REQUIRED_PROPERTY_OPEN_STATUS
The structure could not be opened/closed because it does not haveProperty.OPEN_STATUS. -
CANNOT_FIND_COORDINATES
TheStructurecould not be toggled because it could not find the target coordinates to move to. -
CANNOT_SKIP_UNSKIPPABLE
TheStructurecould not be toggled because it was requested to skip an animation that cannot be skipped. -
CANNOT_SKIP
Called when trying to skip an animation for a type of structure that does not support skipping animations. -
INSTANCE_UNREGISTERED
The exact instance of theStructurethat is to be toggled isn't registered in theStructureRegistry. -
CANCELLED
TheStructurecould not be toggled because it was cancelled. -
TOO_BIG
TheStructureexceeded the size limit. -
NO_PERMISSION
The player who tried to toggle it or, if not present (e.g. when toggled via redstone"), the original creator does not have permission to open to toggle theStructurebecause they are not allowed to break blocks in the new location. This happens when a compatibility hook interferes (e.g. WorldGuard). -
OBSTRUCTED
An attempt to toggle (or open/close) aStructurefailed because it was obstructed. -
NO_DIRECTION
TheStructuredid not have enough space to move. -
ALREADY_OPEN
TheStructurecould not be opened because it is already open. -
ALREADY_CLOSED
TheStructurecould not be closed because it is already closed. -
TYPE_DISABLED
TheStructurecould not be toggled because its type was disabled at compile time.
-
-
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
-
getLocalizationKey
-