fix handling empty messages

This commit is contained in:
hyperdefined
2025-01-18 13:06:38 -05:00
parent c68a04851b
commit 98ee84ad13
4 changed files with 13 additions and 3 deletions

View File

@@ -70,7 +70,9 @@ public class VillagerTrade implements Listener {
// if the player shift clicks, show the warning
if (event.isShiftClick()) {
Component component = toolStats.configTools.formatLore("shift-click-warning.trading", null, null);
event.getWhoClicked().sendMessage(component);
if (component != null) {
event.getWhoClicked().sendMessage(component);
}
}
ItemStack newItem = addLore(item, player);
if (newItem != null) {