mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-30 17:32:02 +00:00
Update heal to account for the fact that 20 is not always the max health
This commit is contained in:
parent
2836c0862d
commit
d9ee9b036c
1 changed files with 6 additions and 6 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue