diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index f4e5783784..5d80d36503 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -1275,7 +1275,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { public String getAsString() { CraftMetaItem.Applicator tag = new CraftMetaItem.Applicator(); applyToItem(tag); - return tag.build().toString(); + DataComponentPatch patch = tag.build(); + NBTBase nbt = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), patch).getOrThrow(); + return nbt.toString(); } @Override