Added use-fast-collated-drops to eco config.yml

This commit is contained in:
Auxilor
2021-07-15 12:24:53 +02:00
committed by Auxilor
parent 083f643ce2
commit 83f9c27238
3 changed files with 21 additions and 8 deletions

View File

@@ -1,5 +1,7 @@
package com.willfp.eco.internal.drops;
import com.willfp.eco.core.EcoPlugin;
import com.willfp.eco.core.config.updating.ConfigUpdater;
import lombok.Getter;
import lombok.experimental.UtilityClass;
import org.jetbrains.annotations.NotNull;
@@ -14,12 +16,8 @@ public final class DropManager {
@Getter
private DropQueueType type = DropQueueType.COLLATED;
/**
* Sets the type of Drop Queue to be used.
*
* @param type The type.
*/
public static void setType(@NotNull final DropQueueType type) {
DropManager.type = type;
@ConfigUpdater
public static void update(@NotNull final EcoPlugin plugin) {
type = plugin.getConfigYml().getBool("use-fast-collated-drops") ? DropQueueType.COLLATED : DropQueueType.STANDARD;
}
}

View File

@@ -8,6 +8,7 @@ import com.willfp.eco.core.integrations.IntegrationLoader;
import com.willfp.eco.core.integrations.anticheat.AnticheatManager;
import com.willfp.eco.core.integrations.antigrief.AntigriefManager;
import com.willfp.eco.core.integrations.mcmmo.McmmoManager;
import com.willfp.eco.internal.drops.DropManager;
import com.willfp.eco.proxy.BlockBreakProxy;
import com.willfp.eco.proxy.SkullProxy;
import com.willfp.eco.proxy.TridentStackProxy;
@@ -177,4 +178,11 @@ public abstract class EcoSpigotPlugin extends EcoPlugin {
new ArrowDataListener(this)
);
}
@Override
public List<Class<?>> getUpdatableClasses() {
return Arrays.asList(
DropManager.class
);
}
}

View File

@@ -3,5 +3,12 @@
# by Auxilor
#
# Options to fix villager bugs left behind from old (buggy) versions.
disable-display-on-villagers: false
villager-display-fix: false
villager-display-fix: false
# DropQueue by default uses a faster collated queue system where all drops
# that originate from the same player on the same tick are dropped together.
# Disable it if it changes drop mechanics too much for you.
use-fast-collated-drops: true