Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,10 +15,16 @@ object CommandReload : Subcommand(
false
) {
override fun onExecute(sender: CommandSender, args: List<String>) {
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()
}
}
2 changes: 2 additions & 0 deletions eco-core/core-plugin/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ main: com.willfp.reforges.ReforgesPlugin
api-version: 1.17
authors: [ Auxilor ]
website: willfp.com
folia-supported: true

depend:
- eco
softdepend:
Expand Down
Loading