mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-28 17:47:41 +01:00
Fixed NullPointerException when hopper destination block is missing
This commit is contained in:
parent
e99a4a86d0
commit
5242973fe8
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user