diff --git a/Changelog.txt b/Changelog.txt index 264203abe..38414333e 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,6 +1,7 @@ Version 2.1.49 Fixed a bug where falling blocks were not marked as unnatural in water Fixed a bug where Ability cooldowns were being called async when they are sync only + Fixed NPE when checking inventory location Version 2.1.48 1.14 Support diff --git a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java index fb080fa32..5ba6c2d39 100644 --- a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java @@ -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();