Move code in sync runnable
This commit is contained in:
parent
dddfb4420c
commit
f53503f16a
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user