mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-24 11:36:11 +01:00
Fixed heal flag (for max. player health(20))
This commit is contained in:
parent
20f91b5258
commit
59a1726e8c
@ -88,7 +88,13 @@ public void run() {
|
||||
healDelay *= 1000;
|
||||
int healAmount = regions.getIntegerFlag(FlagType.HEAL_AMOUNT, true).getValue(1);
|
||||
if (now - nfo.lastHealTick > healDelay) {
|
||||
if (player.getHealth() < 20) {
|
||||
if (player.getHealth() + healAmount > 20) {
|
||||
player.setHealth(20);
|
||||
} else {
|
||||
player.setHealth(player.getHealth() + healAmount);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
nfo.sheduledHealTick = now + healDelay;
|
||||
nfo.sheduledHealAmount = healAmount;
|
||||
|
Loading…
Reference in New Issue
Block a user