Merge pull request #29 from ammodev/fix/npe-inventory-close-when-inventory-null
npe on inventory close when inventory is null
This commit is contained in:
@@ -47,6 +47,10 @@ public class InventoryListener implements Listener {
|
||||
}
|
||||
|
||||
private void log(HumanEntity player, Inventory inv, boolean state) {
|
||||
if(inv == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
int count = 0;
|
||||
for (ItemStack item : inv.getContents()) {
|
||||
if (item == null)
|
||||
|
||||
Reference in New Issue
Block a user