Fix inconsistency with PlayerList updating on the join event

This commit is contained in:
William committed 2022-01-20 18:57:19 +00:00
1 parent dcc1c528fa
commit 68daea3ce9
2 files changed
+8 -3

No files matched your search

@@ -97,10 +97,14 @@ public class PlayerListener implements Listener {
} // Ignore NullPointerExceptions from players that execute this event and return null (e.g Citizens).
// Update the player list
if (Bukkit.getOnlinePlayers().size() == 1) {
if (HuskHomes.getSettings().doBungee()) {
HuskHomes.getPlayerList().updateList(p);
} else {
HuskHomes.getPlayerList().addPlayer(p.getName());
if (Bukkit.getOnlinePlayers().size() == 1) {
HuskHomes.getPlayerList().updateList(p);
} else {
HuskHomes.getPlayerList().addPlayer(p.getName());
}
}
}
@@ -1,6 +1,7 @@
package me.william278.huskhomes2;
package me.william278.huskhomes2.util;
import de.themoep.minedown.MineDown;
import me.william278.huskhomes2.HuskHomes;
import net.md_5.bungee.api.ChatMessageType;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;