mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-06 14:46:32 +02:00
Update heal to account for the fact that 20 is not always the max health
This commit is contained in:
@@ -68,14 +68,14 @@ public class Commandheal extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void healPlayer(final Player p)
|
private void healPlayer(final Player player)
|
||||||
{
|
{
|
||||||
p.setHealth(20);
|
player.setHealth(player.getMaxHealth());
|
||||||
p.setFoodLevel(20);
|
player.setFoodLevel(20);
|
||||||
p.sendMessage(_("heal"));
|
player.sendMessage(_("heal"));
|
||||||
for (PotionEffect effect : p.getActivePotionEffects())
|
for (PotionEffect effect : player.getActivePotionEffects())
|
||||||
{
|
{
|
||||||
p.removePotionEffect(effect.getType());
|
player.removePotionEffect(effect.getType());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user