From 86413e60a004a31f3ab71af1c0942c73352cee05 Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 22 Nov 2021 17:04:07 +0100 Subject: [PATCH] Update RespawnRunnable.java --- .../java/rip/tilly/bedwars/runnables/RespawnRunnable.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/rip/tilly/bedwars/runnables/RespawnRunnable.java b/src/main/java/rip/tilly/bedwars/runnables/RespawnRunnable.java index 4505c67..ef49f70 100644 --- a/src/main/java/rip/tilly/bedwars/runnables/RespawnRunnable.java +++ b/src/main/java/rip/tilly/bedwars/runnables/RespawnRunnable.java @@ -31,6 +31,10 @@ public class RespawnRunnable extends BukkitRunnable { cancel(); return; } + if (this.playerData.getPlayerState() != PlayerState.RESPAWNING || this.playerData.getPlayerState() != PlayerState.PLAYING) { + cancel(); + return; + } if (this.respawnTime <= 1) { this.playerData.setPlayerState(PlayerState.PLAYING);