@@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
88You must replace the language file embedded in the server jar.
99
1010diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
11- index 6cc4bad2ecd19f44a680ff03cbfb99d48ea5c337..b1fbb931148a87f29e8b8796b13851d767cc1d68 100644
11+ index 6cc4bad2ecd19f44a680ff03cbfb99d48ea5c337..e301d477c4839c27854293998ae235b91c9c46e5 100644
1212--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
1313+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
14- @@ -160,5 +160,16 @@ public interface ItemFactory {
14+ @@ -160,5 +160,19 @@ public interface ItemFactory {
1515 */
1616 @NotNull
1717 net.kyori.adventure.text.Component displayName(@NotNull ItemStack itemStack);
@@ -23,16 +23,19 @@ index 6cc4bad2ecd19f44a680ff03cbfb99d48ea5c337..b1fbb931148a87f29e8b8796b13851d7
2323+ *
2424+ * @param item Item to return Display name of
2525+ * @return Display name of Item
26+ + * @deprecated {@link ItemStack} implements {@link net.kyori.adventure.translation.Translatable}; use that and
27+ + * {@link net.kyori.adventure.text.Component#translatable(net.kyori.adventure.translation.Translatable)} instead.
2628+ */
2729+ @Nullable
30+ + @Deprecated
2831+ String getI18NDisplayName(@Nullable ItemStack item);
2932 // Paper end
3033 }
3134diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
32- index a15abec467bac70116a6fc21a300d4930b909f15..de5bcdb7b84acdd5e22500e367df292f35a86e19 100644
35+ index a15abec467bac70116a6fc21a300d4930b909f15..dfd16531926e639231e93cb295de3d802d17413d 100644
3336--- a/src/main/java/org/bukkit/inventory/ItemStack.java
3437+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
35- @@ -611,5 +611,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
38+ @@ -611,5 +611,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, net.kyor
3639 public @NotNull net.kyori.adventure.text.Component displayName() {
3740 return Bukkit.getServer().getItemFactory().displayName(this);
3841 }
@@ -43,8 +46,11 @@ index a15abec467bac70116a6fc21a300d4930b909f15..de5bcdb7b84acdd5e22500e367df292f
4346+ * You must replace the language file embedded in the server jar.
4447+ *
4548+ * @return Display name of Item
49+ + * @deprecated {@link ItemStack} implements {@link net.kyori.adventure.translation.Translatable}; use that and
50+ + * {@link net.kyori.adventure.text.Component#translatable(net.kyori.adventure.translation.Translatable)} instead.
4651+ */
4752+ @Nullable
53+ + @Deprecated
4854+ public String getI18NDisplayName() {
4955+ return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
5056+ }
0 commit comments