#995: Add required feature to MinecraftExperimental for easy lookups

By: 2008Choco <hawkeboyz2@hotmail.com>
This commit is contained in:
Bukkit/Spigot
2024-04-24 18:19:37 +10:00
parent c5183dc422
commit 9f064c2cc7
27 changed files with 282 additions and 240 deletions

View File

@ -24,4 +24,29 @@ import org.jetbrains.annotations.ApiStatus;
})
@ApiStatus.Internal
public @interface MinecraftExperimental {
/**
* Get the feature that must be enabled for the annotated object to be valid.
* <p>
* While this value is not used anywhere in Bukkit, it is a convenience value to assist
* in locating relevant annotated elements for removal once no longer deemed an experimental
* feature by Minecraft. See {@link Requires} for information about use in plugins.
*
* @return the required feature flag
*/
Requires value();
/**
* An enum identifying a feature flag required by a {@link MinecraftExperimental} feature.
* <p>
* Constants defined by this enum <strong>ARE NOT API!</strong> Constants may be added or
* removed without warning and will not necessarily align perfectly with those defined in
* FeatureFlag. At no point should plugins depend on this enum. Refer to {@link FeatureFlag}
* instead.
*/
@ApiStatus.Internal
public enum Requires {
UPDATE_1_21
}
}