mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
Pulling all pending Bukkit-JavaDoc changes
A special thanks goes to @aerouk for almost all of the changes found here. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@@ -10,7 +10,9 @@ import com.google.common.collect.ImmutableMap;
|
||||
|
||||
/**
|
||||
* This designates the warning state for a specific item.
|
||||
* When the server settings dictate 'default' warnings, warnings are printed if the {@link #value()} is true.
|
||||
* <p>
|
||||
* When the server settings dictate 'default' warnings, warnings are printed
|
||||
* if the {@link #value()} is true.
|
||||
*/
|
||||
@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@@ -30,7 +32,8 @@ public @interface Warning {
|
||||
*/
|
||||
OFF,
|
||||
/**
|
||||
* Indicates each warning would default to the configured {@link Warning} annotation, or always if annotation not found.
|
||||
* Indicates each warning would default to the configured {@link
|
||||
* Warning} annotation, or always if annotation not found.
|
||||
*/
|
||||
DEFAULT;
|
||||
|
||||
@@ -51,12 +54,16 @@ public @interface Warning {
|
||||
.build();
|
||||
|
||||
/**
|
||||
* This method checks the provided warning should be printed for this state
|
||||
* This method checks the provided warning should be printed for this
|
||||
* state
|
||||
*
|
||||
* @param warning The warning annotation added to a deprecated item
|
||||
* @return ON is always True<br>
|
||||
* OFF is always false<br>
|
||||
* DEFAULT is false if and only if annotation is not null and specifies false for {@link Warning#value()}, true otherwise.
|
||||
* @return <ul>
|
||||
* <li>ON is always True
|
||||
* <li>OFF is always false
|
||||
* <li>DEFAULT is false if and only if annotation is not null and
|
||||
* specifies false for {@link Warning#value()}, true otherwise.
|
||||
* </ul>
|
||||
*/
|
||||
public boolean printFor(Warning warning) {
|
||||
if (this == DEFAULT) {
|
||||
@@ -66,10 +73,12 @@ public @interface Warning {
|
||||
}
|
||||
|
||||
/**
|
||||
* This method returns the corresponding warning state for the given string value.
|
||||
* This method returns the corresponding warning state for the given
|
||||
* string value.
|
||||
*
|
||||
* @param value The string value to check
|
||||
* @return {@link #DEFAULT} if not found, or the respective WarningState
|
||||
* @return {@link #DEFAULT} if not found, or the respective
|
||||
* WarningState
|
||||
*/
|
||||
public static WarningState value(final String value) {
|
||||
if (value == null) {
|
||||
@@ -84,7 +93,8 @@ public @interface Warning {
|
||||
}
|
||||
|
||||
/**
|
||||
* This sets if the deprecation warnings when registering events gets printed when the setting is in the default state.
|
||||
* This sets if the deprecation warnings when registering events gets
|
||||
* printed when the setting is in the default state.
|
||||
*
|
||||
* @return false normally, or true to encourage warning printout
|
||||
*/
|
||||
|
Reference in New Issue
Block a user