Fix Tablist gone after softreload

This commit is contained in:
Lixfel
2024-12-01 19:22:48 +01:00
parent 4dcfeb77b2
commit 116005c0c9
@@ -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());
}
}