From 2f06ea374ec75e812a1555946c6efec8ac9b0726 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Wed, 8 Jun 2022 16:18:04 +0200 Subject: [PATCH] Simplify connection detection Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/listeners/TablistManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/listeners/TablistManager.java b/src/de/steamwar/bungeecore/listeners/TablistManager.java index 48d9adb..f2a76d5 100644 --- a/src/de/steamwar/bungeecore/listeners/TablistManager.java +++ b/src/de/steamwar/bungeecore/listeners/TablistManager.java @@ -50,7 +50,7 @@ public class TablistManager extends BasicListener { @EventHandler public synchronized void onJoin(PostLoginEvent e){ 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())); } }, 1, TimeUnit.SECONDS);