From 116005c0c9f2ffc24197a13911482f42f2429937 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sun, 1 Dec 2024 19:22:48 +0100 Subject: [PATCH] Fix Tablist gone after softreload --- .../src/de/steamwar/velocitycore/tablist/TablistManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VelocityCore/src/de/steamwar/velocitycore/tablist/TablistManager.java b/VelocityCore/src/de/steamwar/velocitycore/tablist/TablistManager.java index c008d76c..06c0d725 100644 --- a/VelocityCore/src/de/steamwar/velocitycore/tablist/TablistManager.java +++ b/VelocityCore/src/de/steamwar/velocitycore/tablist/TablistManager.java @@ -55,7 +55,7 @@ public class TablistManager extends BasicListener { public TablistManager() { VelocityCore.schedule(this::updateTablist).repeat(1, TimeUnit.SECONDS).schedule(); synchronized (tablists) { - VelocityCore.getProxy().getAllPlayers().forEach(player -> tablists.put(player, new Tablist(player))); + VelocityCore.getProxy().getAllPlayers().forEach(player -> tablists.computeIfAbsent(player, Tablist::new).onServerSwitch()); } }