diff options
author | Iaccidentally <coryhuckaby@gmail.com> | 2013-01-26 17:12:17 -0500 |
---|---|---|
committer | Iaccidentally <coryhuckaby@gmail.com> | 2013-01-26 17:12:17 -0500 |
commit | d9ee9b036c54d624f083f862e1e4a79aae88d7d1 (patch) | |
tree | da7eb82b48c49a80e6e8a78959d77614158e6dc2 | |
parent | 2836c0862d6a8ecf29987439d57b75956d69dd74 (diff) | |
download | Essentials-d9ee9b036c54d624f083f862e1e4a79aae88d7d1.tar Essentials-d9ee9b036c54d624f083f862e1e4a79aae88d7d1.tar.gz Essentials-d9ee9b036c54d624f083f862e1e4a79aae88d7d1.tar.lz Essentials-d9ee9b036c54d624f083f862e1e4a79aae88d7d1.tar.xz Essentials-d9ee9b036c54d624f083f862e1e4a79aae88d7d1.zip |
Update heal to account for the fact that 20 is not always the max health
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandheal.java | 12 |
1 files 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()); } } } |