Skip to content

Commit 9e09a52

Browse files
committed
serialize lore and category name properly
1 parent 8f7e9e6 commit 9e09a52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fabric-1.20.1/src/main/java/io/tebex/plugin/gui/TebexItemBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ public ItemStack buildItemStack() {
3939

4040
NbtList loreList = new NbtList();
4141
lore.forEach(loreEntry -> {
42-
loreList.add(NbtString.of(loreEntry));
42+
loreList.add(NbtString.of(Text.Serializer.toJson(Text.of(loreEntry))));
4343
});
4444
displayTag.put(ItemStack.LORE_KEY, loreList);
45-
displayTag.putString("Name", this.displayName);
45+
displayTag.putString("Name", Text.Serializer.toJson(Text.of(this.displayName)));
4646
for (ItemStack.TooltipSection tooltipSection : hideFlags) {
4747
stack.addHideFlag(tooltipSection);
4848
}

0 commit comments

Comments
 (0)