mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-02 02:33:08 +00:00
Prevent sign healing when the player is recently dead.
This commit is contained in:
parent
159cbba809
commit
8427b41e30
1 changed files with 4 additions and 0 deletions
|
@ -24,6 +24,10 @@ public class SignHeal extends EssentialsSign
|
|||
@Override
|
||||
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess) throws SignException, ChargeException
|
||||
{
|
||||
if (player.getHealth() == 0)
|
||||
{
|
||||
throw new SignException(_("healDead"));
|
||||
}
|
||||
final Trade charge = getTrade(sign, 1, ess);
|
||||
charge.isAffordableFor(player);
|
||||
player.setHealth(20);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue