diff --git a/src/main/java/com/songoda/ultimatestacker/events/InteractListeners.java b/src/main/java/com/songoda/ultimatestacker/events/InteractListeners.java index 338af82..1dfc2ff 100644 --- a/src/main/java/com/songoda/ultimatestacker/events/InteractListeners.java +++ b/src/main/java/com/songoda/ultimatestacker/events/InteractListeners.java @@ -26,6 +26,8 @@ public class InteractListeners implements Listener { @EventHandler public void onAccept(InventoryPickupItemEvent event) { ItemStack item = event.getItem().getItemStack(); + if (new ItemStack(item.getType()).getMaxStackSize() == item.getMaxStackSize()) return; + instance.getStackingTask().setMax(item, 0, true); int amt = item.getAmount(); int max = item.getMaxStackSize(); diff --git a/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java b/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java index 8cd63e2..9e76865 100644 --- a/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java +++ b/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java @@ -60,6 +60,8 @@ public class StackingTask extends BukkitRunnable { if (entityO instanceof Item && instance.getConfig().getBoolean("Main.Stack Items")) { ItemStack item = ((Item) entityO).getItemStack(); + if (entityO.hasMetadata("grabbed")) continue; + if (entityO.isCustomNameVisible() && !entityO.getCustomName().contains(TextComponent.convertToInvisibleString("IS")) || item.hasItemMeta() && item.getItemMeta().hasDisplayName()) continue;