mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-09 14:14:59 +00:00
better null handling
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user