Add stack count check for throwable replacement
This commit is contained in:
parent
f0c89e897b
commit
c94f56f0ac
@ -73,7 +73,8 @@ public class StackReplaceListener implements Listener {
|
|||||||
slot = EquipmentSlot.OFF_HAND;
|
slot = EquipmentSlot.OFF_HAND;
|
||||||
else return;
|
else return;
|
||||||
|
|
||||||
if (findAndMoveSimilarStack(stack, slot, inventory, CompareFunc.defaultFunc()))
|
if (inventory.getItem(slot).getAmount() == 1 &&
|
||||||
|
findAndMoveSimilarStack(stack, slot, inventory, CompareFunc.defaultFunc()))
|
||||||
logger.fine(LOG_PLUGIN_NAME + " Moved snowball into empty hand for player " + thrower.getName());
|
logger.fine(LOG_PLUGIN_NAME + " Moved snowball into empty hand for player " + thrower.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user