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 @Override
public void run() { public void run() {
e.getPlayer().sendMessage(changes.pop()); if (!e.getPlayer().isOnline()) {
if (changes.empty())
stopScheduler(); stopScheduler();
return;
}
if (changes.empty()) {
stopScheduler();
return;
}
e.getPlayer().sendMessage(changes.pop());
} }
}, 20, 20); }, 20, 20);
} }