fix: sacrifice — enable spectator flight, skip dead survivor controllers

This commit is contained in:
loki5512344 2026-06-14 16:51:49 +02:00
parent 2706d6d123
commit 8b1bcf0433
2 changed files with 4 additions and 0 deletions

View file

@ -32,6 +32,8 @@ public class HookSacrifice {
// Convert to SPECTATOR mode
if (player != null && player.isOnline()) {
player.setGameMode(org.bukkit.GameMode.SPECTATOR);
player.setAllowFlight(true);
player.setFlying(true);
player.sendMessage(plugin.getConfigManager().getMessages().get("hook.sacrifice.message"));
}

View file

@ -25,6 +25,8 @@ public class SurvivorController {
public void onHealCancel() { healing.cancelHealing(); }
public void tick() {
PlayerState state = survivor.getState();
if (state == PlayerState.DEAD || state == PlayerState.ESCAPED) return;
movement.tick();
healing.tick();
updateSpeed();