Fixed some issues, working towards implementing the cross-server list system (#19)

This commit is contained in:
BuildTools committed 2021-03-15 09:48:57 +00:00
1 parent da30aa9076
commit 8de5e954b3
3 files changed
+54 -12

No files matched your search

@@ -33,8 +33,15 @@ public class CrossServerListHandler {
playerList.put(server, players);
}
public static void requestHashsetUpdate(Player player) {
public static void updatePlayerList(Player p) {
playerList.clear();
PluginMessageHandler.requestPlayerLists(player);
if (p == null) {
for (Player x : Bukkit.getOnlinePlayers()) {
p = x;
}
}
if (p != null) {
PluginMessageHandler.requestPlayerLists(p);
}
}
}