Enum Class Result

java.lang.Object
java.lang.Enum<Result>
com.plotsquared.core.events.Result
All Implemented Interfaces:
Serializable, Comparable<Result>, Constable

public enum Result extends Enum<Result>
Enum for CancellablePlotEvent.

DENY: do not allow the event to happen ALLOW: allow the event to continue as normal, subject to standard checks FORCE: force the event to occur, even if normal checks would deny. WARNING: this may have unintended consequences! Make sure you study the appropriate code before using!

  • Enum Constant Details

    • DENY

      public static final Result DENY
    • ACCEPT

      public static final Result ACCEPT
    • FORCE

      public static final Result FORCE
  • Method Details

    • values

      public static Result[] 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 Result 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
    • valueOf

      public static Result valueOf(int eventResult)
      Obtain the Result enum associated with the int value
      Parameters:
      eventResult - the int value
      Returns:
      the corresponding Result
    • getValue

      public int getValue()
      Get int value of enum
      Returns:
      integer value