Move code in sync runnable

This commit is contained in:
AlexTheCoder 2016-07-28 21:07:29 -04:00
parent dddfb4420c
commit f53503f16a

View File

@ -93,14 +93,15 @@ public class Recall extends Skill
if (health == null) if (health == null)
return; return;
if (!player.getWorld().equals(locs.getLast().getWorld()))
return;
Factory.runSync(() -> { Factory.runSync(() -> {
if (player.isDead()) if (player.isDead())
{ {
return; return;
} }
if (!player.getWorld().equals(locs.getLast().getWorld()))
{
return;
}
//Heal //Heal
double newHealth = Math.min(health.getLast(), player.getHealth() + 3 + level); double newHealth = Math.min(health.getLast(), player.getHealth() + 3 + level);
player.setHealth(newHealth); player.setHealth(newHealth);