Update RespawnRunnable.java

This commit is contained in:
Luca 2021-11-22 15:51:11 +01:00
parent da55dbf164
commit a0e46dd5a5

View File

@ -25,13 +25,9 @@ public class RespawnRunnable extends BukkitRunnable {
private final int startingTime;
private int respawnTime;
private boolean isInGame(PlayerData playerData) {
return playerData.getPlayerState() == PlayerState.PLAYING;
}
@Override
public void run() {
if (!this.isInGame(this.playerData)) {
if (!this.player.isOnline()) {
cancel();
return;
}