类 PlayerList
java.lang.Object
net.minecraft.server.players.PlayerList
- 直接已知子类:
DedicatedPlayerList
,IntegratedPlayerList
-
字段概要
字段修饰符和类型字段说明private final Map<UUID,
PlayerAdvancements> private static final boolean
private boolean
private static final SimpleDateFormat
private final UserBanList
static final Component
private boolean
static final File
private final IpBanList
private static final org.slf4j.Logger
protected final int
static final File
private final ServerOpList
private final PlayerDataStorage
private final List<ServerPlayer>
private final Map<UUID,
ServerPlayer> private final List<ServerPlayer>
private final LayeredRegistryAccess<RegistryLayer>
private static final int
private int
private final MinecraftServer
private int
private final Map<UUID,
ServerStatsCounter> private final RegistryAccess.Frozen
static final File
private int
private final UserWhiteList
static final File
-
构造器概要
构造器构造器说明PlayerList
(MinecraftServer pServer, LayeredRegistryAccess<RegistryLayer> pRegistries, PlayerDataStorage pPlayerIo, int pMaxPlayers) -
方法概要
修饰符和类型方法说明void
addWorldborderListener
(ServerLevel pLevel) void
broadcast
(Player pExcept, double pX, double pY, double pZ, double pRadius, ResourceKey<Level> pDimension, Packet<?> pPacket) void
broadcastAll
(Packet<?> pPacket) void
broadcastAll
(Packet<?> pPacket, ResourceKey<Level> pDimension) private void
broadcastChatMessage
(PlayerChatMessage pMessage, Predicate<ServerPlayer> pShouldFilterMessageTo, ServerPlayer pSender, ChatType.Bound pBoundChatType) void
broadcastChatMessage
(PlayerChatMessage pMessage, CommandSourceStack pSender, ChatType.Bound pBoundChatType) void
broadcastChatMessage
(PlayerChatMessage pMessage, ServerPlayer pSender, ChatType.Bound pBoundChatType) void
broadcastSystemMessage
(Component pMessage, boolean pBypassHiddenChat) void
broadcastSystemMessage
(Component pServerMessage, Function<ServerPlayer, Component> pPlayerMessageFactory, boolean pBypassHiddenChat) void
broadcastSystemToAllExceptTeam
(Player pPlayer, Component pMessage) void
broadcastSystemToTeam
(Player pPlayer, Component pMessage) boolean
canBypassPlayerLimit
(com.mojang.authlib.GameProfile pProfile) canPlayerLogin
(SocketAddress pSocketAddress, com.mojang.authlib.GameProfile pGameProfile) void
deop
(com.mojang.authlib.GameProfile pProfile) getBans()
int
String[]
getOps()
getPlayerAdvancements
(ServerPlayer pPlayer) getPlayerByName
(String pUsername) int
getPlayerForLogin
(com.mojang.authlib.GameProfile pProfile) String[]
getPlayerStats
(Player pPlayer) getPlayersWithAddress
(String pAddress) int
int
String[]
boolean
boolean
isOp
(com.mojang.authlib.GameProfile pProfile) boolean
boolean
isWhiteListed
(com.mojang.authlib.GameProfile pProfile) load
(ServerPlayer pPlayer) void
op
(com.mojang.authlib.GameProfile pProfile) void
placeNewPlayer
(Connection pNetManager, ServerPlayer pPlayer) void
void
void
remove
(ServerPlayer pPlayer) void
respawn
(ServerPlayer pPlayer, boolean pKeepEverything) protected void
save
(ServerPlayer pPlayer) void
saveAll()
void
sendAllPlayerInfo
(ServerPlayer pPlayer) void
sendLevelInfo
(ServerPlayer pPlayer, ServerLevel pLevel) void
sendPlayerPermissionLevel
(ServerPlayer pPlayer) private void
sendPlayerPermissionLevel
(ServerPlayer pPlayer, int pPermLevel) void
setAllowCheatsForAllPlayers
(boolean pAllowCheatsForAllPlayers) void
setSimulationDistance
(int pSimulationDistance) void
setUsingWhiteList
(boolean pWhitelistEnabled) void
setViewDistance
(int pViewDistance) void
tick()
protected void
updateEntireScoreboard
(ServerScoreboard pScoreboard, ServerPlayer pPlayer) private boolean
verifyChatTrusted
(PlayerChatMessage pMessage)
-
字段详细资料
-
USERBANLIST_FILE
-
IPBANLIST_FILE
-
OPLIST_FILE
-
WHITELIST_FILE
-
CHAT_FILTERED_FULL
-
LOGGER
private static final org.slf4j.Logger LOGGER -
SEND_PLAYER_INFO_INTERVAL
private static final int SEND_PLAYER_INFO_INTERVAL- 另请参阅:
-
BAN_DATE_FORMAT
-
server
-
players
-
playersByUUID
-
bans
-
ipBans
-
ops
-
whitelist
-
stats
-
advancements
-
playerIo
-
doWhiteList
private boolean doWhiteList -
registries
-
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- 另请参阅:
-
sendAllPlayerInfoIn
private int sendAllPlayerInfoIn -
playersView
-
-
构造器详细资料
-
PlayerList
public PlayerList(MinecraftServer pServer, LayeredRegistryAccess<RegistryLayer> pRegistries, PlayerDataStorage pPlayerIo, int pMaxPlayers)
-
-
方法详细资料
-
placeNewPlayer
-
updateEntireScoreboard
-
addWorldborderListener
-
load
-
save
-
remove
-
canPlayerLogin
@Nullable public Component canPlayerLogin(SocketAddress pSocketAddress, com.mojang.authlib.GameProfile pGameProfile) -
getPlayerForLogin
-
respawn
-
sendPlayerPermissionLevel
-
tick
public void tick() -
broadcastAll
-
broadcastAll
-
broadcastSystemToTeam
-
broadcastSystemToAllExceptTeam
-
getPlayerNamesArray
-
getBans
-
getIpBans
-
op
public void op(com.mojang.authlib.GameProfile pProfile) -
deop
public void deop(com.mojang.authlib.GameProfile pProfile) -
sendPlayerPermissionLevel
-
isWhiteListed
public boolean isWhiteListed(com.mojang.authlib.GameProfile pProfile) -
isOp
public boolean isOp(com.mojang.authlib.GameProfile pProfile) -
getPlayerByName
-
broadcast
public void broadcast(@Nullable Player pExcept, double pX, double pY, double pZ, double pRadius, ResourceKey<Level> pDimension, Packet<?> pPacket) -
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 pWhitelistEnabled) -
getPlayersWithAddress
-
getViewDistance
public int getViewDistance() -
getSimulationDistance
public int getSimulationDistance() -
getServer
-
getSingleplayerData
-
setAllowCheatsForAllPlayers
public void setAllowCheatsForAllPlayers(boolean pAllowCheatsForAllPlayers) -
removeAll
public void removeAll() -
broadcastSystemMessage
-
broadcastSystemMessage
public void broadcastSystemMessage(Component pServerMessage, Function<ServerPlayer, Component> pPlayerMessageFactory, boolean pBypassHiddenChat) -
broadcastChatMessage
public void broadcastChatMessage(PlayerChatMessage pMessage, CommandSourceStack pSender, ChatType.Bound pBoundChatType) -
broadcastChatMessage
public void broadcastChatMessage(PlayerChatMessage pMessage, ServerPlayer pSender, ChatType.Bound pBoundChatType) -
broadcastChatMessage
private void broadcastChatMessage(PlayerChatMessage pMessage, Predicate<ServerPlayer> pShouldFilterMessageTo, @Nullable ServerPlayer pSender, ChatType.Bound pBoundChatType) -
verifyChatTrusted
-
getPlayerStats
-
getPlayerAdvancements
-
setViewDistance
public void setViewDistance(int pViewDistance) -
setSimulationDistance
public void setSimulationDistance(int pSimulationDistance) -
getPlayers
-
getPlayer
-
canBypassPlayerLimit
public boolean canBypassPlayerLimit(com.mojang.authlib.GameProfile pProfile) -
reloadResources
public void reloadResources() -
isAllowCheatsForAllPlayers
public boolean isAllowCheatsForAllPlayers()
-