mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-06 15:12:13 -07:00
Fix and deprecate ItemStack#getI18NDisplayName (#7358)
This commit is contained in:
@@ -23,8 +23,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ *
|
||||
+ * @param item Item to return Display name of
|
||||
+ * @return Display name of Item
|
||||
+ * @deprecated {@link ItemStack} implements {@link net.kyori.adventure.translation.Translatable}; use that and
|
||||
+ * {@link net.kyori.adventure.text.Component#translatable(net.kyori.adventure.translation.Translatable)} instead.
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @Deprecated
|
||||
+ String getI18NDisplayName(@Nullable ItemStack item);
|
||||
// Paper end
|
||||
}
|
||||
@@ -43,8 +46,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ * You must replace the language file embedded in the server jar.
|
||||
+ *
|
||||
+ * @return Display name of Item
|
||||
+ * @deprecated {@link ItemStack} implements {@link net.kyori.adventure.translation.Translatable}; use that and
|
||||
+ * {@link net.kyori.adventure.text.Component#translatable(net.kyori.adventure.translation.Translatable)} instead.
|
||||
+ */
|
||||
+ @Nullable
|
||||
+ @Deprecated
|
||||
+ public String getI18NDisplayName() {
|
||||
+ return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
|
||||
+ }
|
||||
|
Reference in New Issue
Block a user