Skip to content

Commit

Permalink
Edited onResetHealth() to allow /skills resethealth to be run from an…
Browse files Browse the repository at this point in the history
… RCON session.
  • Loading branch information
jfhorton committed Aug 11, 2023
1 parent da0db32 commit 4561ec0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4561ec0

Please sign in to comment.