Permalink
Browse files

Added config option to ignore hoppers moving items.

Defaults to old behavior (false).
  • Loading branch information...
wizjany committed Oct 14, 2017
1 parent f76259d commit 95b88ea64b1e167290fbe920ba3253563ae963a9
@@ -183,7 +183,7 @@
public boolean disableObsidianGenerators;
public boolean strictEntitySpawn;
public TargetMatcherSet allowAllInteract;
public boolean ignoreHopperMoveEvents;
public TargetMatcherSet blockUseAtFeet;
private Map<String, Integer> maxRegionCounts;
@@ -352,6 +352,7 @@ private void loadConfiguration() {
strictEntitySpawn = getBoolean("event-handling.block-entity-spawns-with-untraceable-cause", false);
allowAllInteract = getTargetMatchers("event-handling.interaction-whitelist");
blockUseAtFeet = getTargetMatchers("event-handling.emit-block-use-at-feet");
ignoreHopperMoveEvents = getBoolean("event-handling.ignore-hopper-item-move-events", false);
itemDurability = getBoolean("protection.item-durability", true);
removeInfiniteStacks = getBoolean("protection.remove-infinite-stacks", false);
@@ -794,6 +794,10 @@ public void onInventoryMoveItem(InventoryMoveItemEvent event) {
InventoryHolder sourceHolder = event.getSource().getHolder();
InventoryHolder targetHolder = event.getDestination().getHolder();
if (causeHolder instanceof Hopper && getPlugin().getGlobalStateManager().get(((Hopper) causeHolder).getWorld()).ignoreHopperMoveEvents) {
return;
}
Entry entry;
if ((entry = moveItemDebounce.tryDebounce(event)) != null) {

0 comments on commit 95b88ea

Please sign in to comment.