mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 13:24:17 -07:00
Fix NPE with enchantable (#11557)
This commit is contained in:
@@ -40,17 +40,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ // Paper start - deprecate getKey
|
||||
+ /**
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#INSTRUMENT}. MusicInstruments
|
||||
+ * can exist without a key.
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
|
||||
+ * and {@link io.papermc.paper.registry.RegistryKey#INSTRUMENT}. MusicInstruments can exist without a key.
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true, since = "1.20.5")
|
||||
+ @Override
|
||||
+ public abstract @NotNull NamespacedKey getKey();
|
||||
+ // Paper end - deprecate getKey
|
||||
+
|
||||
// Paper start - translation key
|
||||
@Override
|
||||
public @NotNull String translationKey() {
|
||||
// Paper start - mark translation key as deprecated
|
||||
/**
|
||||
* @deprecated this method assumes that the instrument description
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
@@ -197,8 +197,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public abstract StructureType getStructureType();
|
||||
+ // Paper start - deprecate getKey
|
||||
+ /**
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)} and {@link Registry#STRUCTURE}. Structures
|
||||
+ * can exist without a key.
|
||||
+ * @deprecated use {@link Registry#getKey(Keyed)}, {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)},
|
||||
+ * and {@link io.papermc.paper.registry.RegistryKey#STRUCTURE}. Structures can exist without a key.
|
||||
+ */
|
||||
+ @Override
|
||||
+ @Deprecated(since = "1.20.4")
|
||||
|
Reference in New Issue
Block a user