diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/commands/CommandReload.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/commands/CommandReload.kt index 220dc45..aa47db9 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/commands/CommandReload.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/reforges/commands/CommandReload.kt @@ -1,5 +1,6 @@ package com.willfp.reforges.commands +import com.willfp.eco.core.Prerequisite import com.willfp.eco.core.command.impl.Subcommand import com.willfp.eco.util.StringUtils import com.willfp.eco.util.toNiceString @@ -14,10 +15,16 @@ object CommandReload : Subcommand( false ) { override fun onExecute(sender: CommandSender, args: List) { - sender.sendMessage( - plugin.langYml.getMessage("reloaded", StringUtils.FormatOption.WITHOUT_PLACEHOLDERS) - .replace("%time%", plugin.reloadWithTime().toNiceString()) - .replace("%count%", Reforges.values().size.toNiceString()) - ) + val runnable = Runnable { + sender.sendMessage( + plugin.langYml.getMessage("reloaded", StringUtils.FormatOption.WITHOUT_PLACEHOLDERS) + .replace("%time%", plugin.reloadWithTime().toNiceString()) + .replace("%count%", Reforges.values().size.toNiceString()) + ) + } + if (Prerequisite.HAS_FOLIA.isMet) + plugin.scheduler.runTask(runnable) // run on global thread + else + runnable.run() } } \ No newline at end of file diff --git a/eco-core/core-plugin/src/main/resources/plugin.yml b/eco-core/core-plugin/src/main/resources/plugin.yml index d9c6ffd..07cb609 100644 --- a/eco-core/core-plugin/src/main/resources/plugin.yml +++ b/eco-core/core-plugin/src/main/resources/plugin.yml @@ -4,6 +4,8 @@ main: com.willfp.reforges.ReforgesPlugin api-version: 1.17 authors: [ Auxilor ] website: willfp.com +folia-supported: true + depend: - eco softdepend: