mirror of
https://github.com/songoda/UltimateStacker.git
synced 2024-11-24 02:56:24 +01:00
Fixed issue with single max stacks.
This commit is contained in:
parent
ac39a0b9a0
commit
e3cb4abe9b
@ -391,7 +391,7 @@ public class UltimateStacker extends SongodaPlugin {
|
|||||||
|
|
||||||
if (newAmount > (itemStack.getMaxStackSize() / 2) && !blacklisted) {
|
if (newAmount > (itemStack.getMaxStackSize() / 2) && !blacklisted) {
|
||||||
item.setMetadata("US_AMT", new FixedMetadataValue(INSTANCE, newAmount));
|
item.setMetadata("US_AMT", new FixedMetadataValue(INSTANCE, newAmount));
|
||||||
itemStack.setAmount(itemStack.getMaxStackSize() / 2);
|
itemStack.setAmount(Math.max(1, itemStack.getMaxStackSize() / 2));
|
||||||
} else {
|
} else {
|
||||||
item.removeMetadata("US_AMT", INSTANCE);
|
item.removeMetadata("US_AMT", INSTANCE);
|
||||||
itemStack.setAmount(newAmount);
|
itemStack.setAmount(newAmount);
|
||||||
|
Loading…
Reference in New Issue
Block a user