Skip to content

Commit

Permalink
Fixed NullPointerException when hopper destination block is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelli committed May 14, 2024
1 parent e99a4a8 commit 5242973
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public final class HopperPushListener {

static void processHopperPush(Location location, InventoryHolder sourceHolder, InventoryHolder destinationHolder, ItemStack item) {
Location destinationLocation = destinationHolder.getInventory().getLocation();
if (destinationLocation == null) {
return;
}

String loggingChestId = "#hopper-push." + destinationLocation.getBlockX() + "." + destinationLocation.getBlockY() + "." + destinationLocation.getBlockZ();
Object[] lastAbort = ConfigHandler.hopperAbort.get(loggingChestId);
if (lastAbort != null) {
Expand Down

0 comments on commit 5242973

Please sign in to comment.