mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +02:00
add config holder.
This commit is contained in:
parent
3afe786b38
commit
643487e1a9
9 changed files with 271 additions and 69 deletions
|
|
@ -4,6 +4,7 @@ import io.delilaheve.CustomAnvil
|
|||
import org.bukkit.command.Command
|
||||
import org.bukkit.command.CommandExecutor
|
||||
import org.bukkit.command.CommandSender
|
||||
import xyz.alexcrea.cuanvil.config.ConfigHolder
|
||||
|
||||
class ReloadExecutor : CommandExecutor {
|
||||
override fun onCommand(sender: CommandSender, cmd: Command, cmdstr: String, args: Array<out String>): Boolean {
|
||||
|
|
@ -30,7 +31,7 @@ class ReloadExecutor : CommandExecutor {
|
|||
*/
|
||||
private fun commandBody(hardfail: Boolean): Boolean{
|
||||
try {
|
||||
return CustomAnvil.instance.reloadAllConfigs(hardfail)
|
||||
return ConfigHolder.reloadAllFromDisk(hardfail);
|
||||
}catch (e: Exception){
|
||||
e.printStackTrace()
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue