diff --git a/paper-api/src/main/java/org/bukkit/command/defaults/EffectCommand.java b/paper-api/src/main/java/org/bukkit/command/defaults/EffectCommand.java index bfa5b2a57b..8d9b742577 100644 --- a/paper-api/src/main/java/org/bukkit/command/defaults/EffectCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/defaults/EffectCommand.java @@ -16,7 +16,7 @@ public class EffectCommand extends VanillaCommand { public EffectCommand() { super("effect"); this.description = "Adds/Removes effects on players"; - this.usageMessage = "/effect [seconds] [amplifier]"; + this.usageMessage = "/effect [seconds] [amplifier]"; this.setPermission("bukkit.command.effect"); } @@ -50,6 +50,14 @@ public class EffectCommand extends VanillaCommand { return true; } + if ("clear".equalsIgnoreCase(args[1])) { + for (PotionEffect effect : player.getActivePotionEffects()) { + player.removePotionEffect(effect.getType()); + } + sender.sendMessage(String.format("Took all effects from %s", args[0])); + return true; + } + PotionEffectType effect = PotionEffectType.getByName(args[1]); if (effect == null) {