Move code in sync runnable
This commit is contained in:
parent
dddfb4420c
commit
f53503f16a
|
@ -92,15 +92,16 @@ public class Recall extends Skill
|
|||
LinkedList<Double> health = _healthMap.remove(player);
|
||||
if (health == null)
|
||||
return;
|
||||
|
||||
if (!player.getWorld().equals(locs.getLast().getWorld()))
|
||||
return;
|
||||
|
||||
Factory.runSync(() -> {
|
||||
if (player.isDead())
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!player.getWorld().equals(locs.getLast().getWorld()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
//Heal
|
||||
double newHealth = Math.min(health.getLast(), player.getHealth() + 3 + level);
|
||||
player.setHealth(newHealth);
|
||||
|
|
Loading…
Reference in New Issue