#1082: Add "since" to Deprecation annotations
By: DerFrZocker <derrieple@gmail.com>
This commit is contained in:
@@ -239,7 +239,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* @deprecated enchantments are badly named, use {@link #getKey()}.
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13")
|
||||
public abstract String getName();
|
||||
|
||||
/**
|
||||
@@ -263,7 +263,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* @deprecated enchantment groupings are now managed by tags, not categories
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.5")
|
||||
public abstract EnchantmentTarget getItemTarget();
|
||||
|
||||
/**
|
||||
@@ -275,7 +275,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* @return true if the enchantment is a treasure enchantment
|
||||
* @deprecated enchantment types are now managed by tags
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.21")
|
||||
public abstract boolean isTreasure();
|
||||
|
||||
/**
|
||||
@@ -288,7 +288,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* only for {@link Enchantment#BINDING_CURSE} and
|
||||
* {@link Enchantment#VANISHING_CURSE}.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13")
|
||||
public abstract boolean isCursed();
|
||||
|
||||
/**
|
||||
@@ -320,7 +320,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
*/
|
||||
@Contract("null -> null")
|
||||
@Nullable
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.3")
|
||||
public static Enchantment getByKey(@Nullable NamespacedKey key) {
|
||||
if (key == null) {
|
||||
return null;
|
||||
@@ -335,7 +335,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* @return Resulting Enchantment, or null if not found
|
||||
* @deprecated enchantments are badly named, use {@link #getByKey(org.bukkit.NamespacedKey)}.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.13")
|
||||
@Contract("null -> null")
|
||||
@Nullable
|
||||
public static Enchantment getByName(@Nullable String name) {
|
||||
@@ -353,7 +353,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* @deprecated use {@link Registry#iterator() Registry.ENCHANTMENT.iterator()}
|
||||
*/
|
||||
@NotNull
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.3")
|
||||
public static Enchantment[] values() {
|
||||
return Lists.newArrayList(Registry.ENCHANTMENT).toArray(new Enchantment[0]);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public enum EnchantmentTarget {
|
||||
*
|
||||
* @deprecated this target no longer exists in Vanilla
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.16.1")
|
||||
ALL {
|
||||
@Override
|
||||
public boolean includes(@NotNull Material item) {
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* A simple wrapper for ease of selecting {@link Enchantment}s
|
||||
* @deprecated only for backwards compatibility, EnchantmentWrapper is no longer used.
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(since = "1.20.3")
|
||||
public abstract class EnchantmentWrapper extends Enchantment {
|
||||
protected EnchantmentWrapper() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user