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

@@ -65,7 +65,9 @@ public class CraftItem implements Listener {
// if the player shift clicks, send them this warning
if (event.isShiftClick()) {
Component component = toolStats.configTools.formatLore("shift-click-warning.crafting", null, null);
event.getWhoClicked().sendMessage(component);
if (component != null) {
event.getWhoClicked().sendMessage(component);
}
}
// test the item before setting it