Skip to content
Closed
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
4 changes: 3 additions & 1 deletion plugin/src/main/kotlin/trplugins/menu/module/conf/Loader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ object Loader {
return@start result
}
if (result.succeed() && TrMenu.SETTINGS.getBoolean("Loader.Listen-Files", true)) {
listen(it)
if (TrMenu.SETTINGS.getBoolean("Options.File-Listener")) {
listen(it)
}
} else errors.addAll(result.errors)
result
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import org.bukkit.command.CommandSender
import taboolib.common.platform.command.subCommand
import taboolib.module.configuration.Type
import taboolib.platform.util.sendLang
import trplugins.menu.TrMenu
import trplugins.menu.api.suffixes
import trplugins.menu.module.conf.Loader
import trplugins.menu.module.display.Menu
Expand Down Expand Up @@ -56,8 +57,10 @@ object CommandConvert : CommandExpression {
File(file.parentFile, "${file.nameWithoutExtension}.${type.suffixes[0]}").let {
menu.conf.file = it
menu.conf.saveToFile()
// 开始监听新文件
Loader.listen(it)
if (TrMenu.SETTINGS.getBoolean("Options.File-Listener")) {
// 开始监听新文件
Loader.listen(it)
}
}
}
sender.sendLang("Command-Convert-Converted", menu.id, type.name)
Expand Down
2 changes: 2 additions & 0 deletions plugin/src/main/resources/settings.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Options:
# High, Normal, Low
Running-Performance: Normal
# Optional the file listener (auto reload menu config)
File-Listener: true
Multi-Thread: true
Async-Load-Menus: true
# 是否启用并发加载菜单
Expand Down