Package net.minecraft.server.players
Class PlayerList
java.lang.Object
net.minecraft.server.players.PlayerList
- Direct Known Subclasses:
DedicatedPlayerList,IntegratedPlayerList
-
Field Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionPlayerList(MinecraftServer p_203842_, LayeredRegistryAccess<RegistryLayer> p_251844_, PlayerDataStorage p_203844_, int p_203845_) -
Method Summary
Modifier 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_) voidsetAllowCommandsForAllPlayers(boolean p_321498_) 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
-
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
-
server
-
players
-
playersByUUID
-
bans
-
ipBans
-
ops
-
whitelist
-
stats
-
advancements
-
playerIo
-
doWhiteList
private boolean doWhiteList -
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
-
-
Constructor Details
-
PlayerList
public PlayerList(MinecraftServer p_203842_, LayeredRegistryAccess<RegistryLayer> p_251844_, PlayerDataStorage p_203844_, int p_203845_)
-
-
Method Details
-
placeNewPlayer
public 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_) -
getPlayerForLogin
public ServerPlayer getPlayerForLogin(com.mojang.authlib.GameProfile p_215625_, ClientInformation p_302018_) -
disconnectAllPlayersWithProfile
public boolean disconnectAllPlayersWithProfile(com.mojang.authlib.GameProfile p_295670_) -
respawn
-
sendPlayerPermissionLevel
-
tick
public void tick() -
broadcastAll
-
broadcastAll
-
broadcastSystemToTeam
-
broadcastSystemToAllExceptTeam
-
getPlayerNamesArray
-
getBans
-
getIpBans
-
op
public void op(com.mojang.authlib.GameProfile p_11254_) -
deop
public void deop(com.mojang.authlib.GameProfile p_11281_) -
sendPlayerPermissionLevel
-
isWhiteListed
public boolean isWhiteListed(com.mojang.authlib.GameProfile p_11294_) -
isOp
public boolean isOp(com.mojang.authlib.GameProfile p_11304_) -
getPlayerByName
-
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
-
getWhiteListNames
-
getOps
-
getOpNames
-
reloadWhiteList
public void reloadWhiteList() -
sendLevelInfo
-
sendAllPlayerInfo
-
getPlayerCount
public int getPlayerCount() -
getMaxPlayers
public int getMaxPlayers() -
isUsingWhitelist
public boolean isUsingWhitelist() -
setUsingWhiteList
public void setUsingWhiteList(boolean p_11276_) -
getPlayersWithAddress
-
getViewDistance
public int getViewDistance() -
getSimulationDistance
public int getSimulationDistance() -
getServer
-
getSingleplayerData
-
setAllowCommandsForAllPlayers
public void setAllowCommandsForAllPlayers(boolean p_321498_) -
removeAll
public void removeAll() -
broadcastSystemMessage
-
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
-
getPlayerStats
-
getPlayerAdvancements
-
setViewDistance
public void setViewDistance(int p_11218_) -
setSimulationDistance
public void setSimulationDistance(int p_184212_) -
getPlayers
-
getPlayer
-
canBypassPlayerLimit
public boolean canBypassPlayerLimit(com.mojang.authlib.GameProfile p_11298_) -
reloadResources
public void reloadResources() -
isAllowCommandsForAllPlayers
public boolean isAllowCommandsForAllPlayers()
-