9
0
mirror of https://github.com/Auxilor/EcoSkills.git synced 2025-12-31 21:06:40 +00:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
Auxilor
2021-09-17 09:25:07 +01:00
2 changed files with 8 additions and 1 deletions

View File

@@ -3,7 +3,9 @@ package com.willfp.ecoskills.commands
import com.willfp.eco.core.EcoPlugin
import com.willfp.eco.core.command.CommandHandler
import com.willfp.eco.core.command.impl.Subcommand
import com.willfp.ecoskills.EcoSkillsPlugin
import org.bukkit.command.CommandSender
import java.io.IOException
class CommandReload(plugin: EcoPlugin) :
Subcommand(
@@ -14,6 +16,11 @@ class CommandReload(plugin: EcoPlugin) :
) {
override fun getHandler(): CommandHandler {
return CommandHandler { sender: CommandSender, _: List<String> ->
try {
(plugin as EcoSkillsPlugin).dataYml.save()
} catch (e: IOException) {
e.printStackTrace()
}
plugin.reload()
sender.sendMessage(plugin.langYml.getMessage("reloaded"))
}

View File

@@ -160,7 +160,7 @@ abstract class Skill(
messages.add(msg)
}
guiLoreCache[level] = messages
messagesCache[level] = messages
}
return StringUtils.formatList(messages, player)