Package org.bukkit

Enum Class Warning.WarningState

All Implemented Interfaces:
Serializable, Comparable<Warning.WarningState>, Constable
Enclosing class:

public static enum Warning.WarningState extends Enum<Warning.WarningState>
This represents the states that server verbose for warnings may be.
  • Enum Constant Details

    • ON

      public static final Warning.WarningState ON
      Indicates all warnings should be printed for deprecated items.
    • OFF

      public static final Warning.WarningState OFF
      Indicates no warnings should be printed for deprecated items.

      public static final Warning.WarningState DEFAULT
      Indicates each warning would default to the configured Warning annotation, or always if annotation not found.
  • Method Details

    • values

      public static Warning.WarningState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Warning.WarningState 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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • printFor

      public boolean printFor(@Nullable Warning warning)
      This method checks the provided warning should be printed for this state
      warning - The warning annotation added to a deprecated item
      • ON is always True
      • OFF is always false
      • DEFAULT is false if and only if annotation is not null and specifies false for Warning.value(), true otherwise.
    • value

      @NotNull public static Warning.WarningState value(@Nullable String value)
      This method returns the corresponding warning state for the given string value.
      value - The string value to check
      DEFAULT if not found, or the respective WarningState