diff --git a/UltimateStacker-Plugin/pom.xml b/UltimateStacker-Plugin/pom.xml index 9eb36c9..890bf86 100644 --- a/UltimateStacker-Plugin/pom.xml +++ b/UltimateStacker-Plugin/pom.xml @@ -16,7 +16,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.4.1 + 3.5.3 diff --git a/UltimateStacker-Plugin/src/main/java/com.craftaro.ultimatestacker/listeners/BlockListeners.java b/UltimateStacker-Plugin/src/main/java/com.craftaro.ultimatestacker/listeners/BlockListeners.java index ee5141f..cf142be 100644 --- a/UltimateStacker-Plugin/src/main/java/com.craftaro.ultimatestacker/listeners/BlockListeners.java +++ b/UltimateStacker-Plugin/src/main/java/com.craftaro.ultimatestacker/listeners/BlockListeners.java @@ -108,8 +108,8 @@ public class BlockListeners implements Listener { //Remove all items from stack int amountToRemove = Math.min(Settings.MAX_REMOVEABLE.getInt(), stack.getAmount()); ItemStack removed = stack.getMaterial().parseItem(); - removed.setAmount(amountToRemove); - stack.take(amountToRemove); + removed.setAmount(amountToRemove-1); + stack.take(amountToRemove-1); if (Settings.ADD_TO_INVENTORY.getBoolean()) { player.getInventory().addItem(removed); } else { @@ -124,7 +124,7 @@ public class BlockListeners implements Listener { player.getWorld().dropItemNaturally(block.getLocation(), stack.getMaterial().parseItem()); } } - if (stack.getAmount() == 1) { + if (stack.getAmount() <= 1) { //Remove stack stack.destroy(); return;