mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2025-01-29 22:51:21 +01:00
Fixed instances of NullPointerException in CraftItemEvent
This commit is contained in:
parent
f0702339f2
commit
c69a5a58c0
@ -119,6 +119,10 @@ public final class CraftItemListener extends Queue implements Listener {
|
||||
|
||||
if (addItem.getAmount() > 0) {
|
||||
for (ItemStack oldItem : oldItems) {
|
||||
if (oldItem == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemStack removedItem = oldItem.clone();
|
||||
removedItem.setAmount(oldItem.getAmount() * amountMultiplier);
|
||||
playerCraftItem(player.getLocation(), player.getName(), removedItem, ItemLogger.ITEM_DESTROY);
|
||||
|
Loading…
Reference in New Issue
Block a user