Archiviert
1
0

Simplify connection detection

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-06-08 16:18:04 +02:00
Ursprung 6769fd88e7
Commit 2f06ea374e

Datei anzeigen

@ -50,7 +50,7 @@ public class TablistManager extends BasicListener {
@EventHandler @EventHandler
public synchronized void onJoin(PostLoginEvent e){ public synchronized void onJoin(PostLoginEvent e){
BungeeCord.getInstance().getScheduler().schedule(BungeeCore.get(), () -> { BungeeCord.getInstance().getScheduler().schedule(BungeeCore.get(), () -> {
if (BungeeCord.getInstance().getPlayer(e.getPlayer().getUniqueId()) != null) { if (e.getPlayer().isConnected()) {
tablists.put(e.getPlayer(), new Tablist(e.getPlayer())); tablists.put(e.getPlayer(), new Tablist(e.getPlayer()));
} }
}, 1, TimeUnit.SECONDS); }, 1, TimeUnit.SECONDS);