Fixed issue with single max stacks.

This commit is contained in:
songoda 2019-09-18 12:36:51 -04:00
parent dfd170d001
commit 34c39821a9

View File

@ -391,7 +391,7 @@ public class UltimateStacker extends SongodaPlugin {
if (newAmount > (itemStack.getMaxStackSize() / 2) && !blacklisted) {
item.setMetadata("US_AMT", new FixedMetadataValue(INSTANCE, newAmount));
itemStack.setAmount(itemStack.getMaxStackSize() / 2);
itemStack.setAmount(Math.max(1, itemStack.getMaxStackSize() / 2));
} else {
item.removeMetadata("US_AMT", INSTANCE);
itemStack.setAmount(newAmount);