Skip to content

Commit

Permalink
Add (noisy) logging for all hopper pulls
Browse files Browse the repository at this point in the history
  • Loading branch information
FastLizard4 committed Jun 2, 2024
1 parent b48dcec commit 95e4277
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.List;
import java.util.Set;

import net.coreprotect.utility.Chat;
import org.bukkit.Location;
import org.bukkit.inventory.BrewerInventory;
import org.bukkit.inventory.FurnaceInventory;
Expand All @@ -24,6 +25,7 @@ static void processHopperPull(Location location, InventoryHolder sourceHolder, I
String loggingChestId = "#hopper-pull." + location.getBlockX() + "." + location.getBlockY() + "." + location.getBlockZ();
Object[] lastAbort = ConfigHandler.hopperAbort.get(loggingChestId);
if (lastAbort != null) {
Chat.console("Logging hopper pull: " + loggingChestId);
ItemStack[] destinationContents = destinationHolder.getInventory().getContents();
if (((Set<?>) lastAbort[0]).contains(item) && Arrays.equals(destinationContents, (ItemStack[]) lastAbort[1])) {
return;
Expand Down

0 comments on commit 95e4277

Please sign in to comment.