diff options
Diffstat (limited to 'patches/api/0202-Add-methods-to-get-translation-keys.patch')
-rw-r--r-- | patches/api/0202-Add-methods-to-get-translation-keys.patch | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/patches/api/0202-Add-methods-to-get-translation-keys.patch b/patches/api/0202-Add-methods-to-get-translation-keys.patch index 13d99de8c2..000d7769c8 100644 --- a/patches/api/0202-Add-methods-to-get-translation-keys.patch +++ b/patches/api/0202-Add-methods-to-get-translation-keys.patch @@ -187,7 +187,7 @@ index 309a79cbe65498c90d9e135607bc246688ac6274..8820dd330cee4f8463f2f39f84d4be07 if (this.isItem()) { return asItemType().getTranslationKey(); diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java -index 807e89d026bffae521ead39c514a872ae4d406b3..c9f02466a04d20579fe2258bb02acf98e163ca81 100644 +index 807e89d026bffae521ead39c514a872ae4d406b3..f87364de1bf24ee78e0d823d9081a5f352934405 100644 --- a/src/main/java/org/bukkit/MusicInstrument.java +++ b/src/main/java/org/bukkit/MusicInstrument.java @@ -6,7 +6,7 @@ import java.util.Collections; @@ -199,17 +199,20 @@ index 807e89d026bffae521ead39c514a872ae4d406b3..c9f02466a04d20579fe2258bb02acf98 public static final MusicInstrument PONDER_GOAT_HORN = getInstrument("ponder_goat_horn"); public static final MusicInstrument SING_GOAT_HORN = getInstrument("sing_goat_horn"); -@@ -46,4 +46,11 @@ public abstract class MusicInstrument implements Keyed { +@@ -46,4 +46,14 @@ public abstract class MusicInstrument implements Keyed { private static MusicInstrument getInstrument(@NotNull String key) { 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 e3faa2c675c85a9cbdbbb1debec0ff81c58a1bbd..fd1629c2d2028a88fb3d56b0aeb833d17235080a 100644 |