Update RespawnRunnable.java
This commit is contained in:
parent
da55dbf164
commit
a0e46dd5a5
@ -25,13 +25,9 @@ public class RespawnRunnable extends BukkitRunnable {
|
|||||||
private final int startingTime;
|
private final int startingTime;
|
||||||
private int respawnTime;
|
private int respawnTime;
|
||||||
|
|
||||||
private boolean isInGame(PlayerData playerData) {
|
|
||||||
return playerData.getPlayerState() == PlayerState.PLAYING;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (!this.isInGame(this.playerData)) {
|
if (!this.player.isOnline()) {
|
||||||
cancel();
|
cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user