Fix stack issue.

This commit is contained in:
wizjany 2013-03-12 22:10:34 -04:00
parent a34e48a145
commit 2eb6c76da8

View File

@ -275,7 +275,9 @@ public void stack(CommandContext args, CommandSender sender) throws CommandExcep
if (item2.getTypeId() == item.getTypeId() && if (item2.getTypeId() == item.getTypeId() &&
((!ItemType.usesDamageValue(item.getTypeId()) && ignoreDamaged) ((!ItemType.usesDamageValue(item.getTypeId()) && ignoreDamaged)
|| item.getDurability() == item2.getDurability()) && || item.getDurability() == item2.getDurability()) &&
item.getEnchantments().equals(item2.getEnchantments())) { ((item.getItemMeta() == null && item2.getItemMeta() == null)
|| (item.getItemMeta() != null &&
item.getItemMeta().equals(item2.getItemMeta())))) {
// This stack won't fit in the parent stack // This stack won't fit in the parent stack
if (item2.getAmount() > needed) { if (item2.getAmount() > needed) {
item.setAmount(max); item.setAmount(max);