diff --git a/pom.xml b/pom.xml index 2514de3..adf775e 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ com.songoda UltimateStacker 4.0.0 - 1.11.9 + 1.11.10 clean install UltimateStacker-${project.version} diff --git a/src/main/java/com/songoda/ultimatestacker/listeners/ItemListeners.java b/src/main/java/com/songoda/ultimatestacker/listeners/ItemListeners.java index 3d925ef..d7a4555 100644 --- a/src/main/java/com/songoda/ultimatestacker/listeners/ItemListeners.java +++ b/src/main/java/com/songoda/ultimatestacker/listeners/ItemListeners.java @@ -95,11 +95,9 @@ public class ItemListeners implements Listener { Item item = event.getItem(); ItemStack stack = item.getItemStack(); - if (stack.getMaxStackSize() == 1) return; int amount = UltimateStacker.getActualItemAmount(item); if (amount < (stack.getMaxStackSize() / 2)) return; - - event.getItem().setItemStack(stack); + event.setCancelled(true); event.getPlayer().playSound(event.getPlayer().getLocation(), CompatibleSound.ENTITY_ITEM_PICKUP.getSound(), .2f, (float) (1 + Math.random()));