fix: sacrifice — enable spectator flight, skip dead survivor controllers
This commit is contained in:
parent
2706d6d123
commit
8b1bcf0433
2 changed files with 4 additions and 0 deletions
|
|
@ -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"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue