Enum Class StructureToggleResult

java.lang.Object
java.lang.Enum<StructureToggleResult>
nl.pim16aap2.animatedarchitecture.core.structures.StructureToggleResult
All Implemented Interfaces:
Serializable, Comparable<StructureToggleResult>, Constable

public enum StructureToggleResult extends Enum<StructureToggleResult>
Represent the possible outcomes of trying to toggle a structure.
  • Enum Constant Details

    • SUCCESS

      public static final StructureToggleResult SUCCESS
      No issues were encountered; everything went fine.
    • NO_STRUCTURES_FOUND

      public static final StructureToggleResult NO_STRUCTURES_FOUND
      No Structures were found, so none were toggled.
    • BUSY

      public static final StructureToggleResult BUSY
      The Structure could not be toggled because it is already 'busy': i.e. it is currently moving.
    • LOCKED

      public static final StructureToggleResult LOCKED
      The Structure could not be toggled because it is locked.
    • ERROR

      public static final StructureToggleResult ERROR
      Some undefined error occurred while attempting to toggle this Structure.
    • MISSING_REQUIRED_PROPERTY_OPEN_STATUS

      public static final StructureToggleResult MISSING_REQUIRED_PROPERTY_OPEN_STATUS
      The structure could not be opened/closed because it does not have Property.OPEN_STATUS.
    • CANNOT_FIND_COORDINATES

      public static final StructureToggleResult CANNOT_FIND_COORDINATES
      The Structure could not be toggled because it could not find the target coordinates to move to.
    • CANNOT_SKIP_UNSKIPPABLE

      public static final StructureToggleResult CANNOT_SKIP_UNSKIPPABLE
      The Structure could not be toggled because it was requested to skip an animation that cannot be skipped.
    • CANNOT_SKIP

      public static final StructureToggleResult CANNOT_SKIP
      Called when trying to skip an animation for a type of structure that does not support skipping animations.
    • INSTANCE_UNREGISTERED

      public static final StructureToggleResult INSTANCE_UNREGISTERED
      The exact instance of the Structure that is to be toggled isn't registered in the StructureRegistry.
    • CANCELLED

      public static final StructureToggleResult CANCELLED
      The Structure could not be toggled because it was cancelled.
    • TOO_BIG

      public static final StructureToggleResult TOO_BIG
      The Structure exceeded the size limit.
    • NO_PERMISSION

      public static final StructureToggleResult 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 the Structure because they are not allowed to break blocks in the new location. This happens when a compatibility hook interferes (e.g. WorldGuard).
    • OBSTRUCTED

      public static final StructureToggleResult OBSTRUCTED
      An attempt to toggle (or open/close) a Structure failed because it was obstructed.
    • NO_DIRECTION

      public static final StructureToggleResult NO_DIRECTION
      The Structure did not have enough space to move.
    • ALREADY_OPEN

      public static final StructureToggleResult ALREADY_OPEN
      The Structure could not be opened because it is already open.
    • ALREADY_CLOSED

      public static final StructureToggleResult ALREADY_CLOSED
      The Structure could not be closed because it is already closed.
    • TYPE_DISABLED

      public static final StructureToggleResult TYPE_DISABLED
      The Structure could not be toggled because its type was disabled at compile time.
  • Method Details

    • values

      public static StructureToggleResult[] 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 StructureToggleResult 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
    • getLocalizationKey

      public String getLocalizationKey()