类 PlayerList
java.lang.Object
net.minecraft.server.players.PlayerList
- 所有已实现的接口:
IPlayerListExtension
- 直接已知子类:
DedicatedPlayerList
-
字段概要
字段修饰符和类型字段说明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 Component
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> static final File
private int
private final UserWhiteList
static final File
-
构造器概要
构造器构造器说明PlayerList
(MinecraftServer p_203842_, LayeredRegistryAccess<RegistryLayer> p_251844_, PlayerDataStorage p_203844_, int p_203845_) -
方法概要
修饰符和类型方法说明void
addWorldborderListener
(ServerLevel p_184210_) void
broadcast
(Player p_11242_, double p_11243_, double p_11244_, double p_11245_, double p_11246_, ResourceKey<Level> p_11247_, Packet<?> p_11248_) void
broadcastAll
(Packet<?> p_11269_) void
broadcastAll
(Packet<?> p_11271_, ResourceKey<Level> p_11272_) private void
broadcastChatMessage
(PlayerChatMessage p_249952_, Predicate<ServerPlayer> p_250784_, ServerPlayer p_249623_, ChatType.Bound p_250276_) void
broadcastChatMessage
(PlayerChatMessage p_243229_, CommandSourceStack p_243254_, ChatType.Bound p_243255_) void
broadcastChatMessage
(PlayerChatMessage p_243264_, ServerPlayer p_243234_, ChatType.Bound p_243204_) void
broadcastSystemMessage
(Component p_240618_, boolean p_240644_) void
broadcastSystemMessage
(Component p_240526_, Function<ServerPlayer, Component> p_240594_, boolean p_240648_) void
broadcastSystemToAllExceptTeam
(Player p_215650_, Component p_215651_) void
broadcastSystemToTeam
(Player p_215622_, Component p_215623_) boolean
canBypassPlayerLimit
(com.mojang.authlib.GameProfile p_11298_) canPlayerLogin
(SocketAddress p_11257_, com.mojang.authlib.GameProfile p_11258_) void
deop
(com.mojang.authlib.GameProfile p_11281_) boolean
disconnectAllPlayersWithProfile
(com.mojang.authlib.GameProfile p_295670_) getBans()
int
String[]
getOps()
getPlayerAdvancements
(ServerPlayer p_11297_) getPlayerByName
(String p_11256_) int
String[]
getPlayerStats
(Player p_11240_) getPlayersWithAddress
(String p_11283_) int
int
String[]
boolean
boolean
isOp
(com.mojang.authlib.GameProfile p_11304_) boolean
boolean
isWhiteListed
(com.mojang.authlib.GameProfile p_11294_) load
(ServerPlayer p_11225_, ProblemReporter p_422202_) void
op
(com.mojang.authlib.GameProfile p_11254_) void
placeNewPlayer
(Connection p_11262_, ServerPlayer p_11263_, CommonListenerCookie p_301988_) void
void
void
remove
(ServerPlayer p_11287_) void
respawn
(ServerPlayer p_11237_, boolean p_11238_, Entity.RemovalReason p_348558_) protected void
save
(ServerPlayer p_11277_) void
saveAll()
void
sendActiveEffects
(LivingEntity p_348624_, ServerGamePacketListenerImpl p_348496_) void
sendActivePlayerEffects
(ServerPlayer p_348494_) void
sendAllPlayerInfo
(ServerPlayer p_11293_) void
sendLevelInfo
(ServerPlayer p_11230_, ServerLevel p_11231_) void
sendPlayerPermissionLevel
(ServerPlayer p_11290_) private void
sendPlayerPermissionLevel
(ServerPlayer p_11227_, int p_11228_) void
setAllowCommandsForAllPlayers
(boolean p_321498_) void
setSimulationDistance
(int p_184212_) void
setUsingWhiteList
(boolean p_11276_) void
setViewDistance
(int p_11218_) void
tick()
protected void
updateEntireScoreboard
(ServerScoreboard p_11274_, ServerPlayer p_11275_) private boolean
verifyChatTrusted
(PlayerChatMessage p_251384_) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.neoforged.neoforge.common.extensions.IPlayerListExtension
broadcast, broadcast, broadcastAll, broadcastAll, self
-
字段详细资料
-
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- 另请参阅:
-
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- 另请参阅:
-
sendAllPlayerInfoIn
private int sendAllPlayerInfoIn -
playersView
-
-
构造器详细资料
-
PlayerList
public PlayerList(MinecraftServer p_203842_, LayeredRegistryAccess<RegistryLayer> p_251844_, PlayerDataStorage p_203844_, int p_203845_)
-
-
方法详细资料
-
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_) -
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
-
sendActiveEffects
-
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()
-