Skip to content

Commit

Permalink
strip the display tag from items when setting lore to empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 6, 2023
1 parent 2ba64c9 commit b62926e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Expand Up @@ -338,7 +338,10 @@ public void setLore(ItemTag item, List<String> lore) {
tag.put("display", display);
}
if (lore == null || lore.isEmpty()) {
display.put("Lore", null);
display.remove("Lore");
if (display.isEmpty()) {
tag.remove("display");
}
}
else {
ListTag tagList = new ListTag();
Expand Down
Expand Up @@ -353,7 +353,10 @@ public void setLore(ItemTag item, List<String> lore) {
tag.put("display", display);
}
if (lore == null || lore.isEmpty()) {
display.put("Lore", null);
display.remove("Lore");
if (display.isEmpty()) {
tag.remove("display");
}
}
else {
ListTag tagList = new ListTag();
Expand Down

0 comments on commit b62926e

Please sign in to comment.