Extra code to prevent infinite loop (part of #70)
This commit is contained in:
parent
4024312706
commit
0c8e6dc4a8
|
@ -65,7 +65,11 @@ public class PlayerListener implements Listener {
|
|||
new BukkitRunnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (player.isOnline() && player.getLocation().equals(respawn)) {
|
||||
if (!player.isOnline()) {
|
||||
this.cancel();
|
||||
return;
|
||||
}
|
||||
if (player.getLocation().equals(respawn)) {
|
||||
handleMove(player);
|
||||
this.cancel();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue