From f9c2014ec355b1b68480a7cb521775764e047dc1 Mon Sep 17 00:00:00 2001 From: HexedHero <6012891+HexedHero@users.noreply.github.com> Date: Fri, 16 Oct 2020 05:06:56 +0100 Subject: [PATCH] !Swap and notes --- src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java b/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java index 09b0187c..03814962 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java +++ b/src/main/java/net/Indyuce/mmoitems/api/util/NoClipItem.java @@ -44,7 +44,8 @@ public class NoClipItem implements Listener { InventoryPickupItemEvent.getHandlerList().unregister(this); } - @EventHandler(ignoreCancelled = false, priority = EventPriority.LOWEST) + // Stops items from being picked up by hoppers and portals and then duping them. + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false) public void a(InventoryPickupItemEvent event) { if (event.getItem().equals(item)) { event.setCancelled(true); @@ -52,7 +53,7 @@ public class NoClipItem implements Listener { } } - @EventHandler(ignoreCancelled = false, priority = EventPriority.LOWEST) + @EventHandler(priority = EventPriority.LOWEST, ignoreCancelled = false) public void b(EntityPortalEnterEvent event) { if (event.getEntity().equals(item)) close();