Package net.minecraft.server.players
Class PlayerList
java.lang.Object
net.minecraft.server.players.PlayerList
- Direct Known Subclasses:
DedicatedPlayerList
,IntegratedPlayerList
-
Field Summary
Modifier and TypeFieldDescriptionprivate Map<UUID,PlayerAdvancements>
private static boolean
private boolean
private static SimpleDateFormat
private UserBanList
private boolean
static File
private IpBanList
private static org.apache.logging.log4j.Logger
protected int
static File
private ServerOpList
private PlayerDataStorage
private List<ServerPlayer>
private Map<UUID,ServerPlayer>
private List<ServerPlayer>
private RegistryAccess.RegistryHolder
private static int
private int
private MinecraftServer
private Map<UUID,ServerStatsCounter>
static File
private int
private UserWhiteList
static File
-
Constructor Summary
ConstructorDescriptionPlayerList(MinecraftServer p_11213_, RegistryAccess.RegistryHolder p_11214_, PlayerDataStorage p_11215_, int p_11216_)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addPlayer(ServerPlayer player)
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_)
void
broadcastMessage(Component p_143992_, Function<ServerPlayer,Component> p_143993_, ChatType p_143994_, UUID p_143995_)
void
broadcastMessage(Component p_11265_, ChatType p_11266_, UUID p_11267_)
void
broadcastToAllExceptTeam(Player p_11279_, Component p_11280_)
void
broadcastToTeam(Player p_11250_, Component p_11251_)
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_)
getBans()
int
String[]
getOps()
getPlayerAdvancements(ServerPlayer p_11297_)
getPlayerByName(String p_11256_)
int
getPlayerForLogin(com.mojang.authlib.GameProfile p_11301_)
String[]
getPlayerStats(Player p_11240_)
getPlayersWithAddress(String p_11283_)
int
String[]
boolean
boolean
isOp(com.mojang.authlib.GameProfile p_11304_)
boolean
boolean
isWhiteListed(com.mojang.authlib.GameProfile p_11294_)
load(ServerPlayer p_11225_)
void
op(com.mojang.authlib.GameProfile p_11254_)
void
placeNewPlayer(Connection p_11262_, ServerPlayer p_11263_)
void
void
void
remove(ServerPlayer p_11287_)
void
boolean
removePlayer(ServerPlayer player)
respawn(ServerPlayer p_11237_, boolean p_11238_)
protected void
save(ServerPlayer p_11277_)
void
saveAll()
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
setAllowCheatsForAllPlayers(boolean p_11285_)
void
setLevel(ServerLevel p_11220_)
void
setUsingWhiteList(boolean p_11276_)
void
setViewDistance(int p_11218_)
void
tick()
protected void
updateEntireScoreboard(ServerScoreboard p_11274_, ServerPlayer p_11275_)
-
Field Details
-
USERBANLIST_FILE
-
IPBANLIST_FILE
-
OPLIST_FILE
-
WHITELIST_FILE
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
SEND_PLAYER_INFO_INTERVAL
private static final int SEND_PLAYER_INFO_INTERVAL- See Also:
- Constant Field Values
-
BAN_DATE_FORMAT
-
server
-
players
-
playersByUUID
-
bans
-
ipBans
-
ops
-
whitelist
-
stats
-
advancements
-
playerIo
-
doWhiteList
private boolean doWhiteList -
registryHolder
-
maxPlayers
protected final int maxPlayers -
viewDistance
private int viewDistance -
allowCheatsForAllPlayers
private boolean allowCheatsForAllPlayers -
ALLOW_LOGOUTIVATOR
private static final boolean ALLOW_LOGOUTIVATOR- See Also:
- Constant Field Values
-
sendAllPlayerInfoIn
private int sendAllPlayerInfoIn -
playersView
-
-
Constructor Details
-
PlayerList
public PlayerList(MinecraftServer p_11213_, RegistryAccess.RegistryHolder p_11214_, PlayerDataStorage p_11215_, int p_11216_)
-
-
Method Details
-
placeNewPlayer
-
updateEntireScoreboard
-
setLevel
-
load
-
save
-
remove
-
canPlayerLogin
@Nullable public Component canPlayerLogin(SocketAddress p_11257_, com.mojang.authlib.GameProfile p_11258_) -
getPlayerForLogin
-
respawn
-
sendPlayerPermissionLevel
-
tick
public void tick() -
broadcastAll
-
broadcastAll
-
broadcastToTeam
-
broadcastToAllExceptTeam
-
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() -
getServer
-
getSingleplayerData
-
setAllowCheatsForAllPlayers
public void setAllowCheatsForAllPlayers(boolean p_11285_) -
removeAll
public void removeAll() -
broadcastMessage
-
broadcastMessage
-
getPlayerStats
-
getPlayerAdvancements
-
setViewDistance
public void setViewDistance(int p_11218_) -
getPlayers
-
getPlayer
-
canBypassPlayerLimit
public boolean canBypassPlayerLimit(com.mojang.authlib.GameProfile p_11298_) -
reloadResources
public void reloadResources() -
isAllowCheatsForAllPlayers
public boolean isAllowCheatsForAllPlayers() -
addPlayer
-
removePlayer
-