diff --git a/src/main/java/com/sk89q/worldguard/bukkit/commands/GeneralCommands.java b/src/main/java/com/sk89q/worldguard/bukkit/commands/GeneralCommands.java index 91fc8ae6..675e738e 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/commands/GeneralCommands.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/commands/GeneralCommands.java @@ -238,6 +238,7 @@ public void stack(CommandContext args, CommandSender sender) throws CommandExcep Player player = plugin.checkPlayer(sender); boolean ignoreMax = plugin.hasPermission(player, "worldguard.stack.illegitimate"); + boolean ignoreDamaged = plugin.hasPermission(player, "worldguard.stack.damaged"); ItemStack[] items = player.getInventory().getContents(); int len = items.length; @@ -271,7 +272,7 @@ public void stack(CommandContext args, CommandSender sender) throws CommandExcep // Same type? // Blocks store their color in the damage value if (item2.getTypeId() == item.getTypeId() && - (!ItemType.usesDamageValue(item.getTypeId()) + ((!ItemType.usesDamageValue(item.getTypeId()) && ignoreDamaged) || item.getDurability() == item2.getDurability()) && item.getEnchantments().equals(item2.getEnchantments())) { // This stack won't fit in the parent stack