From d9c5599998d4134d73755d508d21e01600da1d0b Mon Sep 17 00:00:00 2001 From: Brianna Date: Sat, 27 Apr 2019 15:11:29 -0400 Subject: [PATCH] max stack size per entity fix. --- .../java/com/songoda/ultimatestacker/tasks/StackingTask.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java b/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java index e503b85..a8d6df1 100644 --- a/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java +++ b/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java @@ -52,7 +52,7 @@ public class StackingTask extends BukkitRunnable { @Override public void run() { int maxItemStackSize = SettingsManager.Settings.MAX_STACK_ITEMS.getInt(); - int maxEntityStackSize = SettingsManager.Settings.MAX_STACK_ENTITIES.getInt(); + int maxEntityStackSizeGlobal = SettingsManager.Settings.MAX_STACK_ENTITIES.getInt(); int minEntityStackAmount = SettingsManager.Settings.MIN_STACK_ENTITIES.getInt(); List disabledWorlds = SettingsManager.Settings.DISABLED_WORLDS.getStringList(); @@ -118,6 +118,7 @@ public class StackingTask extends BukkitRunnable { if (!configurationSection.getBoolean("Mobs." + initalEntity.getType().name() + ".Enabled")) continue; + int maxEntityStackSize = maxEntityStackSizeGlobal; if (configurationSection.getInt("Mobs." + initalEntity.getType().name() + ".Max Stack Size") != -1) maxEntityStackSize = configurationSection.getInt("Mobs." + initalEntity.getType().name() + ".Max Stack Size");