Class PlayerList

java.lang.Object
net.minecraft.server.players.PlayerList
Direct Known Subclasses:
DedicatedPlayerList, IntegratedPlayerList

public abstract class PlayerList extends Object
  • Field Details

    • USERBANLIST_FILE

      public static final File USERBANLIST_FILE
    • IPBANLIST_FILE

      public static final File IPBANLIST_FILE
    • OPLIST_FILE

      public static final File OPLIST_FILE
    • WHITELIST_FILE

      public static final File WHITELIST_FILE
    • CHAT_FILTERED_FULL

      public static final Component CHAT_FILTERED_FULL
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • SEND_PLAYER_INFO_INTERVAL

      private static final int SEND_PLAYER_INFO_INTERVAL
      See Also:
    • BAN_DATE_FORMAT

      private static final SimpleDateFormat BAN_DATE_FORMAT
    • server

      private final MinecraftServer server
    • players

      private final List<ServerPlayer> players
    • playersByUUID

      private final Map<UUID,ServerPlayer> playersByUUID
    • bans

      private final UserBanList bans
    • ipBans

      private final IpBanList ipBans
    • ops

      private final ServerOpList ops
    • whitelist

      private final UserWhiteList whitelist
    • stats

      private final Map<UUID,ServerStatsCounter> stats
    • advancements

      private final Map<UUID,PlayerAdvancements> advancements
    • playerIo

      private final PlayerDataStorage playerIo
    • doWhiteList

      private boolean doWhiteList
    • registries

      private final LayeredRegistryAccess<RegistryLayer> registries
    • synchronizedRegistries

      private final RegistryAccess.Frozen synchronizedRegistries
    • maxPlayers

      protected final int maxPlayers
    • viewDistance

      private int viewDistance
    • simulationDistance

      private int simulationDistance
    • allowCheatsForAllPlayers

      private boolean allowCheatsForAllPlayers
    • ALLOW_LOGOUTIVATOR

      private static final boolean ALLOW_LOGOUTIVATOR
      See Also:
    • sendAllPlayerInfoIn

      private int sendAllPlayerInfoIn
    • playersView

      private final List<ServerPlayer> playersView
  • Constructor Details

  • Method Details

    • placeNewPlayer

      public void placeNewPlayer(Connection p_11262_, ServerPlayer p_11263_)
    • updateEntireScoreboard

      protected void updateEntireScoreboard(ServerScoreboard p_11274_, ServerPlayer p_11275_)
    • addWorldborderListener

      public void addWorldborderListener(ServerLevel p_184210_)
    • load

      @Nullable public CompoundTag load(ServerPlayer p_11225_)
    • save

      protected void save(ServerPlayer p_11277_)
    • remove

      public void remove(ServerPlayer p_11287_)
    • canPlayerLogin

      @Nullable public Component canPlayerLogin(SocketAddress p_11257_, com.mojang.authlib.GameProfile p_11258_)
    • getPlayerForLogin

      public ServerPlayer getPlayerForLogin(com.mojang.authlib.GameProfile p_215625_)
    • respawn

      public ServerPlayer respawn(ServerPlayer p_11237_, boolean p_11238_)
    • sendPlayerPermissionLevel

      public void sendPlayerPermissionLevel(ServerPlayer p_11290_)
    • tick

      public void tick()
    • broadcastAll

      public void broadcastAll(Packet<?> p_11269_)
    • broadcastAll

      public void broadcastAll(Packet<?> p_11271_, ResourceKey<Level> p_11272_)
    • broadcastSystemToTeam

      public void broadcastSystemToTeam(Player p_215622_, Component p_215623_)
    • broadcastSystemToAllExceptTeam

      public void broadcastSystemToAllExceptTeam(Player p_215650_, Component p_215651_)
    • getPlayerNamesArray

      public String[] getPlayerNamesArray()
    • getBans

      public UserBanList getBans()
    • getIpBans

      public IpBanList getIpBans()
    • op

      public void op(com.mojang.authlib.GameProfile p_11254_)
    • deop

      public void deop(com.mojang.authlib.GameProfile p_11281_)
    • sendPlayerPermissionLevel

      private void sendPlayerPermissionLevel(ServerPlayer p_11227_, int p_11228_)
    • isWhiteListed

      public boolean isWhiteListed(com.mojang.authlib.GameProfile p_11294_)
    • isOp

      public boolean isOp(com.mojang.authlib.GameProfile p_11304_)
    • getPlayerByName

      @Nullable public ServerPlayer getPlayerByName(String p_11256_)
    • broadcast

      public void broadcast(@Nullable Player p_11242_, double p_11243_, double p_11244_, double p_11245_, double p_11246_, ResourceKey<Level> p_11247_, Packet<?> p_11248_)
    • saveAll

      public void saveAll()
    • getWhiteList

      public UserWhiteList getWhiteList()
    • getWhiteListNames

      public String[] getWhiteListNames()
    • getOps

      public ServerOpList getOps()
    • getOpNames

      public String[] getOpNames()
    • reloadWhiteList

      public void reloadWhiteList()
    • sendLevelInfo

      public void sendLevelInfo(ServerPlayer p_11230_, ServerLevel p_11231_)
    • sendAllPlayerInfo

      public void sendAllPlayerInfo(ServerPlayer p_11293_)
    • getPlayerCount

      public int getPlayerCount()
    • getMaxPlayers

      public int getMaxPlayers()
    • isUsingWhitelist

      public boolean isUsingWhitelist()
    • setUsingWhiteList

      public void setUsingWhiteList(boolean p_11276_)
    • getPlayersWithAddress

      public List<ServerPlayer> getPlayersWithAddress(String p_11283_)
    • getViewDistance

      public int getViewDistance()
    • getSimulationDistance

      public int getSimulationDistance()
    • getServer

      public MinecraftServer getServer()
    • getSingleplayerData

      @Nullable public CompoundTag getSingleplayerData()
    • setAllowCheatsForAllPlayers

      public void setAllowCheatsForAllPlayers(boolean p_11285_)
    • removeAll

      public void removeAll()
    • broadcastSystemMessage

      public void broadcastSystemMessage(Component p_240618_, boolean p_240644_)
    • broadcastSystemMessage

      public void broadcastSystemMessage(Component p_240526_, Function<ServerPlayer,Component> p_240594_, boolean p_240648_)
    • broadcastChatMessage

      public void broadcastChatMessage(PlayerChatMessage p_243229_, CommandSourceStack p_243254_, ChatType.Bound p_243255_)
    • broadcastChatMessage

      public void broadcastChatMessage(PlayerChatMessage p_243264_, ServerPlayer p_243234_, ChatType.Bound p_243204_)
    • broadcastChatMessage

      private void broadcastChatMessage(PlayerChatMessage p_249952_, Predicate<ServerPlayer> p_250784_, @Nullable ServerPlayer p_249623_, ChatType.Bound p_250276_)
    • verifyChatTrusted

      private boolean verifyChatTrusted(PlayerChatMessage p_251384_)
    • getPlayerStats

      public ServerStatsCounter getPlayerStats(Player p_11240_)
    • getPlayerAdvancements

      public PlayerAdvancements getPlayerAdvancements(ServerPlayer p_11297_)
    • setViewDistance

      public void setViewDistance(int p_11218_)
    • setSimulationDistance

      public void setSimulationDistance(int p_184212_)
    • getPlayers

      public List<ServerPlayer> getPlayers()
    • getPlayer

      @Nullable public ServerPlayer getPlayer(UUID p_11260_)
    • canBypassPlayerLimit

      public boolean canBypassPlayerLimit(com.mojang.authlib.GameProfile p_11298_)
    • reloadResources

      public void reloadResources()
    • isAllowCheatsForAllPlayers

      public boolean isAllowCheatsForAllPlayers()