From 4561ec002526c3efc966fc6f580da5c2eea9911b Mon Sep 17 00:00:00 2001 From: Jake Date: Fri, 11 Aug 2023 22:59:16 +0100 Subject: [PATCH] Edited onResetHealth() to allow /skills resethealth to be run from an RCON session. --- .../com/archyx/aureliumskills/commands/SkillsRootCommand.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bukkit/src/main/java/com/archyx/aureliumskills/commands/SkillsRootCommand.java b/bukkit/src/main/java/com/archyx/aureliumskills/commands/SkillsRootCommand.java index ffb320d12..6bbeac961 100644 --- a/bukkit/src/main/java/com/archyx/aureliumskills/commands/SkillsRootCommand.java +++ b/bukkit/src/main/java/com/archyx/aureliumskills/commands/SkillsRootCommand.java @@ -28,6 +28,7 @@ import org.bukkit.OfflinePlayer; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.command.RemoteConsoleCommandSender; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitRunnable; @@ -307,7 +308,7 @@ public void onMultiplier(CommandSender sender, @Optional @Flags("other") Player @CommandPermission("aureliumskills.*") @Description("Removes all attribute modifiers by Aurelium Skills for easy uninstalling. This only works on offline players.") public void onResetHealth(CommandSender sender) { - if (sender instanceof ConsoleCommandSender) { + if (sender instanceof ConsoleCommandSender || sender instanceof RemoteConsoleCommandSender) { File playerDataFolder = new File(Bukkit.getWorlds().get(0).getWorldFolder(), "playerdata"); int successful = 0; int error = 0;