Package net.minecraft.server.players
Class PlayerList
java.lang.Object
net.minecraft.server.players.PlayerList
- Direct Known Subclasses:
- DedicatedPlayerList,- IntegratedPlayerList
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final Map<UUID,PlayerAdvancements> private static final booleanprivate booleanprivate static final SimpleDateFormatprivate final UserBanListstatic final Componentprivate booleanstatic final Componentstatic final Fileprivate final IpBanListprivate static final org.slf4j.Loggerprotected final intstatic final Fileprivate final ServerOpListprivate final PlayerDataStorageprivate final List<ServerPlayer>private final Map<UUID,ServerPlayer> private final List<ServerPlayer>private final LayeredRegistryAccess<RegistryLayer>private static final intprivate intprivate final MinecraftServerprivate intprivate final Map<UUID,ServerStatsCounter> static final Fileprivate intprivate final UserWhiteListstatic final File
- 
Constructor SummaryConstructorsConstructorDescriptionPlayerList(MinecraftServer p_203842_, LayeredRegistryAccess<RegistryLayer> p_251844_, PlayerDataStorage p_203844_, int p_203845_) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddWorldborderListener(ServerLevel p_184210_) voidbroadcast(Player p_11242_, double p_11243_, double p_11244_, double p_11245_, double p_11246_, ResourceKey<Level> p_11247_, Packet<?> p_11248_) voidbroadcastAll(Packet<?> p_11269_) voidbroadcastAll(Packet<?> p_11271_, ResourceKey<Level> p_11272_) private voidbroadcastChatMessage(PlayerChatMessage p_249952_, Predicate<ServerPlayer> p_250784_, ServerPlayer p_249623_, ChatType.Bound p_250276_) voidbroadcastChatMessage(PlayerChatMessage p_243229_, CommandSourceStack p_243254_, ChatType.Bound p_243255_) voidbroadcastChatMessage(PlayerChatMessage p_243264_, ServerPlayer p_243234_, ChatType.Bound p_243204_) voidbroadcastSystemMessage(Component p_240618_, boolean p_240644_) voidbroadcastSystemMessage(Component p_240526_, Function<ServerPlayer, Component> p_240594_, boolean p_240648_) voidbroadcastSystemToAllExceptTeam(Player p_215650_, Component p_215651_) voidbroadcastSystemToTeam(Player p_215622_, Component p_215623_) booleancanBypassPlayerLimit(com.mojang.authlib.GameProfile p_11298_) canPlayerLogin(SocketAddress p_11257_, com.mojang.authlib.GameProfile p_11258_) voiddeop(com.mojang.authlib.GameProfile p_11281_) booleandisconnectAllPlayersWithProfile(com.mojang.authlib.GameProfile p_295670_) getBans()intString[]getOps()getPlayerAdvancements(ServerPlayer p_11297_) getPlayerByName(String p_11256_) intgetPlayerForLogin(com.mojang.authlib.GameProfile p_215625_, ClientInformation p_302018_) String[]getPlayerStats(Player p_11240_) getPlayersWithAddress(String p_11283_) intintString[]booleanbooleanisOp(com.mojang.authlib.GameProfile p_11304_) booleanbooleanisWhiteListed(com.mojang.authlib.GameProfile p_11294_) load(ServerPlayer p_11225_) voidop(com.mojang.authlib.GameProfile p_11254_) voidplaceNewPlayer(Connection p_11262_, ServerPlayer p_11263_, CommonListenerCookie p_301988_) voidvoidvoidremove(ServerPlayer p_11287_) voidrespawn(ServerPlayer p_11237_, boolean p_11238_) protected voidsave(ServerPlayer p_11277_) voidsaveAll()voidsendAllPlayerInfo(ServerPlayer p_11293_) voidsendLevelInfo(ServerPlayer p_11230_, ServerLevel p_11231_) voidsendPlayerPermissionLevel(ServerPlayer p_11290_) private voidsendPlayerPermissionLevel(ServerPlayer p_11227_, int p_11228_) voidsetAllowCheatsForAllPlayers(boolean p_11285_) voidsetSimulationDistance(int p_184212_) voidsetUsingWhiteList(boolean p_11276_) voidsetViewDistance(int p_11218_) voidtick()protected voidupdateEntireScoreboard(ServerScoreboard p_11274_, ServerPlayer p_11275_) private booleanverifyChatTrusted(PlayerChatMessage p_251384_) 
- 
Field Details- 
USERBANLIST_FILE
- 
IPBANLIST_FILE
- 
OPLIST_FILE
- 
WHITELIST_FILE
- 
CHAT_FILTERED_FULL
- 
DUPLICATE_LOGIN_DISCONNECT_MESSAGE
- 
LOGGERprivate static final org.slf4j.Logger LOGGER
- 
SEND_PLAYER_INFO_INTERVALprivate static final int SEND_PLAYER_INFO_INTERVAL- See Also:
 
- 
BAN_DATE_FORMAT
- 
server
- 
players
- 
playersByUUID
- 
bans
- 
ipBans
- 
ops
- 
whitelist
- 
stats
- 
advancements
- 
playerIo
- 
doWhiteListprivate boolean doWhiteList
- 
registries
- 
maxPlayersprotected final int maxPlayers
- 
viewDistanceprivate int viewDistance
- 
simulationDistanceprivate int simulationDistance
- 
allowCheatsForAllPlayersprivate boolean allowCheatsForAllPlayers
- 
ALLOW_LOGOUTIVATORprivate static final boolean ALLOW_LOGOUTIVATOR- See Also:
 
- 
sendAllPlayerInfoInprivate int sendAllPlayerInfoIn
- 
playersView
 
- 
- 
Constructor Details- 
PlayerListpublic PlayerList(MinecraftServer p_203842_, LayeredRegistryAccess<RegistryLayer> p_251844_, PlayerDataStorage p_203844_, int p_203845_) 
 
- 
- 
Method Details- 
placeNewPlayerpublic void placeNewPlayer(Connection p_11262_, ServerPlayer p_11263_, CommonListenerCookie p_301988_) 
- 
updateEntireScoreboard
- 
addWorldborderListener
- 
load
- 
save
- 
remove
- 
canPlayerLogin@Nullable public Component canPlayerLogin(SocketAddress p_11257_, com.mojang.authlib.GameProfile p_11258_) 
- 
getPlayerForLoginpublic ServerPlayer getPlayerForLogin(com.mojang.authlib.GameProfile p_215625_, ClientInformation p_302018_) 
- 
disconnectAllPlayersWithProfilepublic boolean disconnectAllPlayersWithProfile(com.mojang.authlib.GameProfile p_295670_) 
- 
respawn
- 
sendPlayerPermissionLevel
- 
tickpublic void tick()
- 
broadcastAll
- 
broadcastAll
- 
broadcastSystemToTeam
- 
broadcastSystemToAllExceptTeam
- 
getPlayerNamesArray
- 
getBans
- 
getIpBans
- 
oppublic void op(com.mojang.authlib.GameProfile p_11254_) 
- 
deoppublic void deop(com.mojang.authlib.GameProfile p_11281_) 
- 
sendPlayerPermissionLevel
- 
isWhiteListedpublic boolean isWhiteListed(com.mojang.authlib.GameProfile p_11294_) 
- 
isOppublic boolean isOp(com.mojang.authlib.GameProfile p_11304_) 
- 
getPlayerByName
- 
broadcastpublic 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_) 
- 
saveAllpublic void saveAll()
- 
getWhiteList
- 
getWhiteListNames
- 
getOps
- 
getOpNames
- 
reloadWhiteListpublic void reloadWhiteList()
- 
sendLevelInfo
- 
sendAllPlayerInfo
- 
getPlayerCountpublic int getPlayerCount()
- 
getMaxPlayerspublic int getMaxPlayers()
- 
isUsingWhitelistpublic boolean isUsingWhitelist()
- 
setUsingWhiteListpublic void setUsingWhiteList(boolean p_11276_) 
- 
getPlayersWithAddress
- 
getViewDistancepublic int getViewDistance()
- 
getSimulationDistancepublic int getSimulationDistance()
- 
getServer
- 
getSingleplayerData
- 
setAllowCheatsForAllPlayerspublic void setAllowCheatsForAllPlayers(boolean p_11285_) 
- 
removeAllpublic void removeAll()
- 
broadcastSystemMessage
- 
broadcastSystemMessagepublic void broadcastSystemMessage(Component p_240526_, Function<ServerPlayer, Component> p_240594_, boolean p_240648_) 
- 
broadcastChatMessagepublic void broadcastChatMessage(PlayerChatMessage p_243229_, CommandSourceStack p_243254_, ChatType.Bound p_243255_) 
- 
broadcastChatMessagepublic void broadcastChatMessage(PlayerChatMessage p_243264_, ServerPlayer p_243234_, ChatType.Bound p_243204_) 
- 
broadcastChatMessageprivate void broadcastChatMessage(PlayerChatMessage p_249952_, Predicate<ServerPlayer> p_250784_, @Nullable ServerPlayer p_249623_, ChatType.Bound p_250276_) 
- 
verifyChatTrusted
- 
getPlayerStats
- 
getPlayerAdvancements
- 
setViewDistancepublic void setViewDistance(int p_11218_) 
- 
setSimulationDistancepublic void setSimulationDistance(int p_184212_) 
- 
getPlayers
- 
getPlayer
- 
canBypassPlayerLimitpublic boolean canBypassPlayerLimit(com.mojang.authlib.GameProfile p_11298_) 
- 
reloadResourcespublic void reloadResources()
- 
isAllowCheatsForAllPlayerspublic boolean isAllowCheatsForAllPlayers()
 
-