geforkt von Mirrors/Paper
Deprecate localized name API (#7212)
Dieser Commit ist enthalten in:
Ursprung
c78111ca2c
Commit
d61fb337c7
@ -169,6 +169,42 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
public ItemMeta getItemMeta() {
|
||||
return this.meta == null ? Bukkit.getItemFactory().getItemMeta(this.type) : this.meta.clone();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -0,0 +0,0 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Checks for existence of a localized name.
|
||||
*
|
||||
+ * @deprecated Use {@link ItemMeta#displayName()} and check if it is instanceof a {@link net.kyori.adventure.text.TranslatableComponent}.
|
||||
* @return true if this has a localized name
|
||||
*/
|
||||
+ @Deprecated // Paper - Deprecate old localized API
|
||||
boolean hasLocalizedName();
|
||||
|
||||
/**
|
||||
@@ -0,0 +0,0 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Plugins should check that hasLocalizedName() returns <code>true</code>
|
||||
* before calling this method.
|
||||
*
|
||||
+ * @deprecated Use {@link ItemMeta#displayName()} and cast it to a {@link net.kyori.adventure.text.TranslatableComponent}. No longer used by the client.
|
||||
* @return the localized name that is set
|
||||
*/
|
||||
+ @Deprecated // Paper - Deprecate old localized API
|
||||
@NotNull
|
||||
String getLocalizedName();
|
||||
|
||||
/**
|
||||
* Sets the localized name.
|
||||
*
|
||||
+ * @deprecated Use {@link ItemMeta#displayName(Component)} with a {@link net.kyori.adventure.text.TranslatableComponent}. No longer used by the client.
|
||||
* @param name the name to set
|
||||
*/
|
||||
+ @Deprecated // Paper - Deprecate old localized API
|
||||
void setLocalizedName(@Nullable String name);
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/material/Step.java b/src/main/java/org/bukkit/material/Step.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/material/Step.java
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren