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
    • DUPLICATE_LOGIN_DISCONNECT_MESSAGE

      public static final Component DUPLICATE_LOGIN_DISCONNECT_MESSAGE
    • 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
    • maxPlayers

      protected final int maxPlayers
    • viewDistance

      private int viewDistance
    • simulationDistance

      private int simulationDistance
    • allowCommandsForAllPlayers

      private boolean allowCommandsForAllPlayers
    • 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_, CommonListenerCookie p_301988_)
    • updateEntireScoreboard

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

      public void addWorldborderListener(ServerLevel p_184210_)
    • load

      public Optional<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_, ClientInformation p_302018_)
    • disconnectAllPlayersWithProfile

      public boolean disconnectAllPlayersWithProfile(com.mojang.authlib.GameProfile p_295670_)
    • respawn

      public ServerPlayer respawn(ServerPlayer p_11237_, boolean p_11238_, Entity.RemovalReason p_348558_)
    • sendActivePlayerEffects

      public void sendActivePlayerEffects(ServerPlayer p_348494_)
    • sendActiveEffects

      public void sendActiveEffects(LivingEntity p_348624_, ServerGamePacketListenerImpl p_348496_)
    • 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()
    • setAllowCommandsForAllPlayers

      public void setAllowCommandsForAllPlayers(boolean p_321498_)
    • 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()
    • isAllowCommandsForAllPlayers

      public boolean isAllowCommandsForAllPlayers()