From d9ee9b036c54d624f083f862e1e4a79aae88d7d1 Mon Sep 17 00:00:00 2001 From: Iaccidentally Date: Sat, 26 Jan 2013 17:12:17 -0500 Subject: Update heal to account for the fact that 20 is not always the max health --- .../src/com/earth2me/essentials/commands/Commandheal.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java index 224e782de..c88dfb852 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandheal.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandheal.java @@ -68,14 +68,14 @@ public class Commandheal extends EssentialsCommand } } - private void healPlayer(final Player p) + private void healPlayer(final Player player) { - p.setHealth(20); - p.setFoodLevel(20); - p.sendMessage(_("heal")); - for (PotionEffect effect : p.getActivePotionEffects()) + player.setHealth(player.getMaxHealth()); + player.setFoodLevel(20); + player.sendMessage(_("heal")); + for (PotionEffect effect : player.getActivePotionEffects()) { - p.removePotionEffect(effect.getType()); + player.removePotionEffect(effect.getType()); } } } -- cgit v1.2.3