1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2025-07-09 09:04:44 +02:00

Fixes - 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
Changelog.txt
src/main/java/com/gmail/nossr50/listeners

@ -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();