Kill players who log out during raids and force respawn players who die in raids
This commit is contained in:
parent
460cc29c04
commit
82679aae8a
@ -251,7 +251,8 @@ public abstract class RaidWorldEvent extends WorldEvent
|
||||
}
|
||||
if (_players.remove(event.getPlayer()))
|
||||
{
|
||||
event.getPlayer().teleport(Spawn.getNorthSpawn());
|
||||
event.getPlayer().setHealth(0);
|
||||
event.getPlayer().spigot().respawn();
|
||||
}
|
||||
}
|
||||
|
||||
@ -264,13 +265,7 @@ public abstract class RaidWorldEvent extends WorldEvent
|
||||
}
|
||||
if (_players.remove(event.getEntity()))
|
||||
{
|
||||
event.getEntity().setHealth(event.getEntity().getMaxHealth());
|
||||
getCondition().Clean(event.getEntity());
|
||||
event.getEntity().getActivePotionEffects().forEach(pe -> event.getEntity().removePotionEffect(pe.getType()));
|
||||
event.getEntity().setExp(0);
|
||||
event.getEntity().setLevel(0);
|
||||
event.getEntity().setFireTicks(-1);
|
||||
event.getEntity().teleport(Spawn.getNorthSpawn());
|
||||
Manager.runSyncLater(() -> event.getEntity().spigot().respawn(), 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user