mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
#914: Make use of ApiStatus.Internal reather than deprecation
By: Doc <nachito94@msn.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
|
|||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@@ -76,9 +77,9 @@ public final class NamespacedKey {
|
|||||||
*
|
*
|
||||||
* @param namespace namespace
|
* @param namespace namespace
|
||||||
* @param key key
|
* @param key key
|
||||||
* @deprecated should never be used by plugins, for internal use only!!
|
* @apiNote should never be used by plugins, for internal use only!!
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@ApiStatus.Internal
|
||||||
public NamespacedKey(@NotNull String namespace, @NotNull String key) {
|
public NamespacedKey(@NotNull String namespace, @NotNull String key) {
|
||||||
Preconditions.checkArgument(namespace != null && isValidNamespace(namespace), "Invalid namespace. Must be [a-z0-9._-]: %s", namespace);
|
Preconditions.checkArgument(namespace != null && isValidNamespace(namespace), "Invalid namespace. Must be [a-z0-9._-]: %s", namespace);
|
||||||
Preconditions.checkArgument(key != null && isValidKey(key), "Invalid key. Must be [a-z0-9/._-]: %s", key);
|
Preconditions.checkArgument(key != null && isValidKey(key), "Invalid key. Must be [a-z0-9/._-]: %s", key);
|
||||||
@@ -158,7 +159,7 @@ public final class NamespacedKey {
|
|||||||
* @return new key
|
* @return new key
|
||||||
* @deprecated should never be used by plugins, for internal use only!!
|
* @deprecated should never be used by plugins, for internal use only!!
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@ApiStatus.Internal
|
||||||
@NotNull
|
@NotNull
|
||||||
public static NamespacedKey randomKey() {
|
public static NamespacedKey randomKey() {
|
||||||
return new NamespacedKey(BUKKIT, UUID.randomUUID().toString());
|
return new NamespacedKey(BUKKIT, UUID.randomUUID().toString());
|
||||||
|
@@ -8,6 +8,7 @@ import org.bukkit.entity.EntityType;
|
|||||||
import org.bukkit.inventory.meta.BookMeta;
|
import org.bukkit.inventory.meta.BookMeta;
|
||||||
import org.bukkit.inventory.meta.ItemMeta;
|
import org.bukkit.inventory.meta.ItemMeta;
|
||||||
import org.bukkit.inventory.meta.SkullMeta;
|
import org.bukkit.inventory.meta.SkullMeta;
|
||||||
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@@ -155,9 +156,9 @@ public interface ItemFactory {
|
|||||||
* @param material material
|
* @param material material
|
||||||
* @return updated material
|
* @return updated material
|
||||||
* @throws IllegalArgumentException if bad material or data
|
* @throws IllegalArgumentException if bad material or data
|
||||||
* @deprecated for internal use only
|
* @apiNote for internal use only
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@ApiStatus.Internal
|
||||||
@NotNull
|
@NotNull
|
||||||
Material updateMaterial(@NotNull final ItemMeta meta, @NotNull final Material material) throws IllegalArgumentException;
|
Material updateMaterial(@NotNull final ItemMeta meta, @NotNull final Material material) throws IllegalArgumentException;
|
||||||
|
|
||||||
|
@@ -13,6 +13,7 @@ import org.bukkit.inventory.EquipmentSlot;
|
|||||||
import org.bukkit.inventory.ItemFlag;
|
import org.bukkit.inventory.ItemFlag;
|
||||||
import org.bukkit.inventory.meta.tags.CustomItemTagContainer;
|
import org.bukkit.inventory.meta.tags.CustomItemTagContainer;
|
||||||
import org.bukkit.persistence.PersistentDataHolder;
|
import org.bukkit.persistence.PersistentDataHolder;
|
||||||
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@@ -392,9 +393,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
|||||||
* Internal use only! Do not use under any circumstances!
|
* Internal use only! Do not use under any circumstances!
|
||||||
*
|
*
|
||||||
* @param version version
|
* @param version version
|
||||||
* @deprecated internal use only
|
* @apiNote internal use only
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@ApiStatus.Internal
|
||||||
void setVersion(int version);
|
void setVersion(int version);
|
||||||
|
|
||||||
@SuppressWarnings("javadoc")
|
@SuppressWarnings("javadoc")
|
||||||
|
@@ -21,6 +21,7 @@ import org.bukkit.permissions.Permissible;
|
|||||||
import org.bukkit.permissions.Permission;
|
import org.bukkit.permissions.Permission;
|
||||||
import org.bukkit.permissions.PermissionDefault;
|
import org.bukkit.permissions.PermissionDefault;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.yaml.snakeyaml.DumperOptions;
|
import org.yaml.snakeyaml.DumperOptions;
|
||||||
@@ -1267,9 +1268,9 @@ public final class PluginDescriptionFile {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return internal use
|
* @return internal use
|
||||||
* @deprecated Internal use
|
* @apiNote Internal use
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@ApiStatus.Internal
|
||||||
@NotNull
|
@NotNull
|
||||||
public String getRawName() {
|
public String getRawName() {
|
||||||
return rawName;
|
return rawName;
|
||||||
|
Reference in New Issue
Block a user