mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 03:25:24 +01:00
Fix stack issue.
This commit is contained in:
parent
a34e48a145
commit
2eb6c76da8
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user