Move code in sync runnable

This commit is contained in:
AlexTheCoder 2016-07-28 21:07:29 -04:00
parent dddfb4420c
commit f53503f16a
1 changed files with 4 additions and 3 deletions

View File

@ -93,14 +93,15 @@ public class Recall extends Skill
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);