diff --git a/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java b/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java index d2b2bd6..ed43055 100644 --- a/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java +++ b/src/main/java/com/songoda/ultimatestacker/tasks/StackingTask.java @@ -31,7 +31,7 @@ public class StackingTask extends BukkitRunnable { private int maxEntityStackSize = Setting.MAX_STACK_ENTITIES.getInt(); private int minEntityStackSize = Setting.MIN_STACK_ENTITIES.getInt(); - private int minPerTypeStacksPerChunk = Setting.MIN_PER_TYPE_STACKS_PER_CHUNK.getInt(); + private int maxPerTypeStacksPerChunk = Setting.MAX_PER_TYPE_STACKS_PER_CHUNK.getInt(); public StackingTask(UltimateStacker plugin) { this.plugin = plugin; @@ -119,8 +119,8 @@ public class StackingTask extends BukkitRunnable { // Is this entity stacked? boolean isStack = stack != null; - if (isStack && minPerTypeStacksPerChunk != -1) { - if (plugin.getEntityUtils().getSimilarStacksInChunk(livingEntity) > minPerTypeStacksPerChunk) { + if (isStack && maxPerTypeStacksPerChunk != -1) { + if (plugin.getEntityUtils().getSimilarStacksInChunk(livingEntity) > maxPerTypeStacksPerChunk) { stack.setAmount(1); livingEntity.remove(); this.processed.add(livingEntity.getUniqueId()); diff --git a/src/main/java/com/songoda/ultimatestacker/utils/settings/Setting.java b/src/main/java/com/songoda/ultimatestacker/utils/settings/Setting.java index 0d47e78..8ca91dd 100644 --- a/src/main/java/com/songoda/ultimatestacker/utils/settings/Setting.java +++ b/src/main/java/com/songoda/ultimatestacker/utils/settings/Setting.java @@ -34,8 +34,8 @@ public enum Setting { "The minimum amount required before a stack can be formed.", "Do not set this to lower than 2."), - MIN_PER_TYPE_STACKS_PER_CHUNK("Entities.Min Per Type Stacks Per Chunk", -1, - "The minimum amount of each entity type stack allowed in a chunk."), + MAX_PER_TYPE_STACKS_PER_CHUNK("Entities.Max Per Type Stacks Per Chunk", -1, + "The maximum amount of each entity type stack allowed in a chunk."), STACK_WHOLE_CHUNK("Entities.Stack Whole Chunk", false, "Should all qualifying entities in each chunk be stacked?",