Skip to content

Commit

Permalink
Fixed itemToItemStack method setting displayname in case of empty
Browse files Browse the repository at this point in the history
  • Loading branch information
fulminazzo committed Dec 23, 2024
1 parent 556761c commit a00887c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public final class ItemAdapter {
}, () -> itemStack.setDurability((short) item.getDurability()));

if (meta != null) {
meta.setDisplayName(item.getDisplayName());
String displayName = item.getDisplayName();
if (!displayName.isEmpty()) meta.setDisplayName(displayName);
meta.setLore(item.getLore());
item.getEnchantments().forEach(e -> {
@NotNull Tuple<Enchantment, Integer> tuple = WrappersAdapter.wEnchantToEnchant(e);
Expand Down

0 comments on commit a00887c

Please sign in to comment.