Package org.bukkit

Enum Warning.WarningState

java.lang.Object
java.lang.Enum<Warning.WarningState>
org.bukkit.Warning.WarningState
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Warning.WarningState>, java.lang.constant.Constable
Enclosing class:
Warning

public static enum Warning.WarningState
extends java.lang.Enum<Warning.WarningState>
This represents the states that server verbose for warnings may be.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    DEFAULT
    Indicates each warning would default to the configured Warning annotation, or always if annotation not found.
    OFF
    Indicates no warnings should be printed for deprecated items.
    ON
    Indicates all warnings should be printed for deprecated items.
  • Method Summary

    Modifier and Type Method Description
    boolean printFor​(Warning warning)
    This method checks the provided warning should be printed for this state
    static Warning.WarningState value​(java.lang.String value)
    This method returns the corresponding warning state for the given string value.
    static Warning.WarningState valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static Warning.WarningState[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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.
    • DEFAULT

      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 type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Warning.WarningState valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • printFor

      public boolean printFor​(Warning warning)
      This method checks the provided warning should be printed for this state
      Parameters:
      warning - The warning annotation added to a deprecated item
      Returns:
      • 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

      public static Warning.WarningState value​(java.lang.String value)
      This method returns the corresponding warning state for the given string value.
      Parameters:
      value - The string value to check
      Returns:
      DEFAULT if not found, or the respective WarningState