Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
4507516f45
Commit
d7dc2515c0
@ -53,7 +53,7 @@ public class ItemUtils {
|
||||
if (!container.has(key, PersistentDataType.STRING)) {
|
||||
return null;
|
||||
}
|
||||
return container.get(ITEM_KEY, PersistentDataType.STRING)
|
||||
return container.get(ITEM_KEY, PersistentDataType.STRING);
|
||||
}
|
||||
|
||||
public void setTag(ItemStack itemStack, NamespacedKey key, String value) {
|
||||
@ -64,7 +64,11 @@ public class ItemUtils {
|
||||
if (meta == null) {
|
||||
return;
|
||||
}
|
||||
meta.getPersistentDataContainer().set(key, PersistentDataType.STRING, value);
|
||||
if (value == null) {
|
||||
meta.getPersistentDataContainer().remove(key);
|
||||
} else {
|
||||
meta.getPersistentDataContainer().set(key, PersistentDataType.STRING, value);
|
||||
}
|
||||
itemStack.setItemMeta(meta);
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren