Fixes #3902 - NPE in Inventory Listener

This commit is contained in:
nossr50
2019-04-25 18:49:18 -07:00
parent 30df57fa35
commit be8a2a4b07
2 changed files with 5 additions and 2 deletions

View File

@ -397,8 +397,10 @@ public class InventoryListener implements Listener {
@EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true)
public void onInventoryMoveItemEvent(InventoryMoveItemEvent event) {
/* WORLD BLACKLIST CHECK */
if(WorldBlacklist.isWorldBlacklisted(event.getSource().getLocation().getWorld()))
return;
if(event.getSource().getLocation() != null)
if(WorldBlacklist.isWorldBlacklisted(event.getSource().getLocation().getWorld()))
return;
Inventory inventory = event.getDestination();