From 5d4eedfef604c2bfa771fbe5931b7ff3bd18ddbd Mon Sep 17 00:00:00 2001 From: Sedri05 Date: Sat, 18 Jun 2022 12:33:18 +0200 Subject: [PATCH] added msg on invalid player --- .../main/kotlin/com/willfp/ecopets/commands/CommandGiveXP.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecopets/commands/CommandGiveXP.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecopets/commands/CommandGiveXP.kt index 89e740b..dc6a7d2 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecopets/commands/CommandGiveXP.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecopets/commands/CommandGiveXP.kt @@ -27,7 +27,10 @@ class CommandGiveXP(plugin: EcoPlugin) : Subcommand(plugin, "givexp", "ecopets.c if (args.size == 3){ player = Bukkit.getPlayer(args[2])!! } - if (!(player is Player)) return; + if (!(player is Player)) { + sender.sendMessage(plugin.langYml.getMessage("invalid-player")) + return + } val pet = Pets.getByID(args[0]) if (pet == null) {