Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.Warning.WarningState Enum Reference

Public Member Functions

boolean printFor (Warning warning)

Static Public Member Functions

static WarningState value (final String value)

Public Attributes


Detailed Description

This represents the states that server verbose for warnings may be.

Definition at line 24 of file Warning.java.

Member Function Documentation

boolean org.bukkit.Warning.WarningState.printFor ( Warning  warning)

This method checks the provided warning should be printed for this state

warningThe 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.

Definition at line 68 of file Warning.java.

References org.bukkit.Warning.value().

68  {
69  if (this == DEFAULT) {
70  return warning == null || warning.value();
71  }
72  return this == ON;
73  }
static WarningState org.bukkit.Warning.WarningState.value ( final String  value)

This method returns the corresponding warning state for the given string value.

valueThe string value to check
DEFAULT if not found, or the respective WarningState

Definition at line 83 of file Warning.java.

83  {
84  if (value == null) {
85  return DEFAULT;
86  }
87  WarningState state = values.get(value.toLowerCase());
88  if (state == null) {
89  return DEFAULT;
90  }
91  return state;
92  }
static WarningState value(final String value)
Definition: Warning.java:83

Member Data Documentation


Indicates no warnings should be printed for deprecated items.

Definition at line 33 of file Warning.java.

Referenced by org.bukkit.plugin.java.JavaPlugin.initialize().


Indicates all warnings should be printed for deprecated items.

Definition at line 29 of file Warning.java.

The documentation for this enum was generated from the following file: