Fix NPE with enchantable (#11557)
This commit is contained in:
parent
bbc8fc8fec
commit
16f8d0f984
41 changed files with 161 additions and 110 deletions
|
@ -204,12 +204,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
return Registry.INSTRUMENT.getOrThrow(NamespacedKey.minecraft(key));
|
||||
}
|
||||
+
|
||||
+ // Paper start - translation key
|
||||
+ // Paper start - mark translation key as deprecated
|
||||
+ /**
|
||||
+ * @deprecated this method assumes that the instrument description
|
||||
+ * always be a translatable component which is not guaranteed.
|
||||
+ */
|
||||
+ @Override
|
||||
+ public @NotNull String translationKey() {
|
||||
+ return "instrument.minecraft." + this.getKey().value();
|
||||
+ }
|
||||
+ // Paper end - translation key
|
||||
+ @Deprecated(forRemoval = true)
|
||||
+ public abstract @NotNull String translationKey();
|
||||
+ // Paper end - mark translation key as deprecated
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Translatable.java b/src/main/java/org/bukkit/Translatable.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue