mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-16 06:30:46 +01:00
#914: Make use of ApiStatus.Internal reather than deprecation
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
8552281a2f
commit
943fb1db3d
4 changed files with 13 additions and 9 deletions
|
@ -4,6 +4,7 @@ import com.google.common.base.Preconditions;
|
|||
import java.util.Locale;
|
||||
import java.util.UUID;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -76,9 +77,9 @@ public final class NamespacedKey {
|
|||
*
|
||||
* @param namespace namespace
|
||||
* @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) {
|
||||
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);
|
||||
|
@ -158,7 +159,7 @@ public final class NamespacedKey {
|
|||
* @return new key
|
||||
* @deprecated should never be used by plugins, for internal use only!!
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.Internal
|
||||
@NotNull
|
||||
public static NamespacedKey randomKey() {
|
||||
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.ItemMeta;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -155,9 +156,9 @@ public interface ItemFactory {
|
|||
* @param material material
|
||||
* @return updated material
|
||||
* @throws IllegalArgumentException if bad material or data
|
||||
* @deprecated for internal use only
|
||||
* @apiNote for internal use only
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.Internal
|
||||
@NotNull
|
||||
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.meta.tags.CustomItemTagContainer;
|
||||
import org.bukkit.persistence.PersistentDataHolder;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
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!
|
||||
*
|
||||
* @param version version
|
||||
* @deprecated internal use only
|
||||
* @apiNote internal use only
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.Internal
|
||||
void setVersion(int version);
|
||||
|
||||
@SuppressWarnings("javadoc")
|
||||
|
|
|
@ -21,6 +21,7 @@ import org.bukkit.permissions.Permissible;
|
|||
import org.bukkit.permissions.Permission;
|
||||
import org.bukkit.permissions.PermissionDefault;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.yaml.snakeyaml.DumperOptions;
|
||||
|
@ -1267,9 +1268,9 @@ public final class PluginDescriptionFile {
|
|||
|
||||
/**
|
||||
* @return internal use
|
||||
* @deprecated Internal use
|
||||
* @apiNote Internal use
|
||||
*/
|
||||
@Deprecated
|
||||
@ApiStatus.Internal
|
||||
@NotNull
|
||||
public String getRawName() {
|
||||
return rawName;
|
||||
|
|
Loading…
Reference in a new issue