fix: changelog display after connection lost

This commit is contained in:
Simon Giesel 2020-05-04 12:03:42 +02:00
parent c00cb8a8e9
commit e1e6c4cf45

View file

@ -54,9 +54,15 @@ public class PlayerJoinQuitListener implements Listener {
@Override
public void run() {
e.getPlayer().sendMessage(changes.pop());
if (changes.empty())
if (!e.getPlayer().isOnline()) {
stopScheduler();
return;
}
if (changes.empty()) {
stopScheduler();
return;
}
e.getPlayer().sendMessage(changes.pop());
}
}, 20, 20);
}