Added 1.21 reload message telling you to relog

This commit is contained in:
Auxilor 2024-06-20 21:27:59 +01:00
parent 2597a1de7e
commit feb2cd7b1f
2 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,9 @@ import org.bukkit.command.CommandSender
class CommandReload(plugin: EcoPlugin) : Subcommand(plugin, "reload", "ecoenchants.command.reload", false) {
override fun onExecute(sender: CommandSender, args: List<String>) {
plugin.reload()
if (Prerequisite.HAS_1_20_3.isMet) {
if (Prerequisite.HAS_1_21.isMet) {
sender.sendMessage(plugin.langYml.getMessage("reloaded-121"))
} else if (Prerequisite.HAS_1_20_3.isMet) {
sender.sendMessage(plugin.langYml.getMessage("reloaded-1203"))
} else {
sender.sendMessage(plugin.langYml.getMessage("reloaded"))

View File

@ -5,6 +5,7 @@ messages:
invalid-command: "&cUnknown subcommand!"
reloaded: "Reloaded!"
reloaded-1203: "Reloaded! You might need to restart your server if you have removed enchantments."
reloaded-121: "Reloaded! Relog if you added enchantments or you will get kicked. Removing enchantments may require a server restart."
invalid-player: "&cInvalid Player!"
requires-player: "&cRequires a Player!"
enabled-descriptions: "&fYou have successfully &aenabled &fenchantment descriptions!"