Update HopperListener.java

Hopper was still sorting when outputting into a ChestLink
This commit is contained in:
jameslfc19 2020-07-12 13:58:19 +01:00
parent d5a4e0be85
commit 8c2df21a58

View File

@ -47,9 +47,11 @@ public class HopperListener implements Listener {
@Override
public void run() {
int hopperAmount = SpigotConfig.getWorldSettings(location.getWorld().getName()).getHopperAmount();
Utils.moveToOtherInventory(event.getSource(), hopperAmount, storage.getInventory());
if(Utils.moveToOtherInventory(event.getSource(), hopperAmount, storage.getInventory())){
storage.updateDisplayItem();
}
event.getDestination().getHolder().getInventory().clear();
storage.sort();
if(storage.getInventory().getViewers().size() > 0) storage.sort();
}
}.runTaskLater(ChestsPlusPlus.PLUGIN, 1);
}