This commit is contained in:
Brianna 2019-08-07 21:57:53 -04:00
parent d0f1dce859
commit 4fb240f15e
2 changed files with 5 additions and 5 deletions

View File

@ -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());

View File

@ -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?",