better null handling

This commit is contained in:
hyperdefined
2022-06-13 02:55:11 -04:00
parent c4e4ce01fd
commit 6af49d6c30
5 changed files with 23 additions and 16 deletions

View File

@@ -65,11 +65,10 @@ public class CraftItem implements Listener {
}
// test the item before setting it
ItemStack newItem = addLore(itemStack, player);
if (newItem == null) {
return;
if (newItem != null) {
// set the result
event.setCurrentItem(newItem);
}
// set the result
event.setCurrentItem(newItem);
}
}
}