From feb2cd7b1f0f0f23295b3b471f0eef7602b8e1af Mon Sep 17 00:00:00 2001 From: Auxilor Date: Thu, 20 Jun 2024 21:27:59 +0100 Subject: [PATCH] Added 1.21 reload message telling you to relog --- .../kotlin/com/willfp/ecoenchants/commands/CommandReload.kt | 4 +++- eco-core/core-plugin/src/main/resources/lang.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/commands/CommandReload.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/commands/CommandReload.kt index fcc3562f..eeaa612e 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/commands/CommandReload.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/commands/CommandReload.kt @@ -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) { 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")) diff --git a/eco-core/core-plugin/src/main/resources/lang.yml b/eco-core/core-plugin/src/main/resources/lang.yml index 8cfb101f..44a17405 100644 --- a/eco-core/core-plugin/src/main/resources/lang.yml +++ b/eco-core/core-plugin/src/main/resources/lang.yml @@ -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!"