mirror of
https://github.com/songoda/UltimateStacker.git
synced 2025-03-10 05:29:08 +01:00
Fixed issue with stacking normally non stackable items
This commit is contained in:
parent
c15a80f66b
commit
651d0e6971
@ -64,7 +64,9 @@ public class StackingTask extends BukkitRunnable {
|
||||
continue;
|
||||
|
||||
int specific = instance.getItemFile().getConfig().getInt("Items." + item.getType().name() + ".Max Stack Size");
|
||||
int max = specific == -1 ? maxItemStackSize : specific;
|
||||
int max = specific == -1 && new ItemStack(item.getType()).getMaxStackSize() != 1 ? maxItemStackSize : specific;
|
||||
|
||||
if (max == -1) max = 1;
|
||||
|
||||
if (item.getMaxStackSize() != max && item.getMaxStackSize() != 1 && (!item.hasItemMeta() || !item.getItemMeta().hasDisplayName()))
|
||||
setMax(item, max, false);
|
||||
|
Loading…
Reference in New Issue
Block a user