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
+6 -1

No files matched your search

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