diff --git a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/drops/DropManager.java b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/drops/DropManager.java index ff6b89be..b48d17f0 100644 --- a/eco-core/core-backend/src/main/java/com/willfp/eco/internal/drops/DropManager.java +++ b/eco-core/core-backend/src/main/java/com/willfp/eco/internal/drops/DropManager.java @@ -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; } } diff --git a/eco-core/core-plugin/src/main/java/com/willfp/eco/spigot/EcoSpigotPlugin.java b/eco-core/core-plugin/src/main/java/com/willfp/eco/spigot/EcoSpigotPlugin.java index bc3c037b..529eaa3f 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/eco/spigot/EcoSpigotPlugin.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/eco/spigot/EcoSpigotPlugin.java @@ -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> getUpdatableClasses() { + return Arrays.asList( + DropManager.class + ); + } } diff --git a/eco-core/core-plugin/src/main/resources/config.yml b/eco-core/core-plugin/src/main/resources/config.yml index dd741b14..ae2ad118 100644 --- a/eco-core/core-plugin/src/main/resources/config.yml +++ b/eco-core/core-plugin/src/main/resources/config.yml @@ -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 \ No newline at end of file +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 \ No newline at end of file