Package net.minecraft.server.management
Class PlayerList
- java.lang.Object
-
- net.minecraft.server.management.PlayerList
-
- Direct Known Subclasses:
DedicatedPlayerList,IntegratedPlayerList
public abstract class PlayerList extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.util.UUID,PlayerAdvancements>advancementsprivate booleanallowCheatsForAllPlayersprivate static java.text.SimpleDateFormatBAN_DATE_FORMATprivate BanListbansprivate booleandoWhiteListstatic java.io.FileIPBANLIST_FILEprivate IPBanListipBansprivate static org.apache.logging.log4j.LoggerLOGGERprotected intmaxPlayersstatic java.io.FileOPLIST_FILEprivate OpListopsprivate GameTypeoverrideGameModeprivate PlayerDataplayerIoprivate java.util.List<ServerPlayerEntity>playersprivate java.util.Map<java.util.UUID,ServerPlayerEntity>playersByUUIDprivate java.util.List<ServerPlayerEntity>playersViewprivate DynamicRegistries.ImplregistryHolderprivate intsendAllPlayerInfoInprivate MinecraftServerserverprivate java.util.Map<java.util.UUID,ServerStatisticsManager>statsstatic java.io.FileUSERBANLIST_FILEprivate intviewDistanceprivate WhiteListwhiteliststatic java.io.FileWHITELIST_FILE
-
Constructor Summary
Constructors Constructor Description PlayerList(MinecraftServer p_i231425_1_, DynamicRegistries.Impl p_i231425_2_, PlayerData p_i231425_3_, int p_i231425_4_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddPlayer(ServerPlayerEntity player)voidbroadcast(PlayerEntity p_148543_1_, double p_148543_2_, double p_148543_4_, double p_148543_6_, double p_148543_8_, RegistryKey<World> p_148543_10_, IPacket<?> p_148543_11_)voidbroadcastAll(IPacket<?> p_148540_1_)voidbroadcastAll(IPacket<?> p_232642_1_, RegistryKey<World> p_232642_2_)voidbroadcastMessage(ITextComponent p_232641_1_, ChatType p_232641_2_, java.util.UUID p_232641_3_)voidbroadcastToAllExceptTeam(PlayerEntity p_177452_1_, ITextComponent p_177452_2_)voidbroadcastToTeam(PlayerEntity p_177453_1_, ITextComponent p_177453_2_)booleancanBypassPlayerLimit(com.mojang.authlib.GameProfile p_183023_1_)ITextComponentcanPlayerLogin(java.net.SocketAddress p_206258_1_, com.mojang.authlib.GameProfile p_206258_2_)voiddeop(com.mojang.authlib.GameProfile p_152610_1_)BanListgetBans()IPBanListgetIpBans()intgetMaxPlayers()java.lang.String[]getOpNames()OpListgetOps()ServerPlayerEntitygetPlayer(java.util.UUID p_177451_1_)PlayerAdvancementsgetPlayerAdvancements(ServerPlayerEntity p_192054_1_)ServerPlayerEntitygetPlayerByName(java.lang.String p_152612_1_)intgetPlayerCount()ServerPlayerEntitygetPlayerForLogin(com.mojang.authlib.GameProfile p_148545_1_)java.lang.String[]getPlayerNamesArray()java.util.List<ServerPlayerEntity>getPlayers()ServerStatisticsManagergetPlayerStats(PlayerEntity p_152602_1_)java.util.List<ServerPlayerEntity>getPlayersWithAddress(java.lang.String p_72382_1_)MinecraftServergetServer()CompoundNBTgetSingleplayerData()intgetViewDistance()WhiteListgetWhiteList()java.lang.String[]getWhiteListNames()booleanisAllowCheatsForAllPlayers()booleanisOp(com.mojang.authlib.GameProfile p_152596_1_)booleanisUsingWhitelist()booleanisWhiteListed(com.mojang.authlib.GameProfile p_152607_1_)CompoundNBTload(ServerPlayerEntity p_72380_1_)voidop(com.mojang.authlib.GameProfile p_152605_1_)voidplaceNewPlayer(NetworkManager p_72355_1_, ServerPlayerEntity p_72355_2_)voidreloadResources()voidreloadWhiteList()voidremove(ServerPlayerEntity p_72367_1_)voidremoveAll()booleanremovePlayer(ServerPlayerEntity player)ServerPlayerEntityrespawn(ServerPlayerEntity p_232644_1_, boolean p_232644_2_)protected voidsave(ServerPlayerEntity p_72391_1_)voidsaveAll()voidsendAllPlayerInfo(ServerPlayerEntity p_72385_1_)voidsendLevelInfo(ServerPlayerEntity p_72354_1_, ServerWorld p_72354_2_)voidsendPlayerPermissionLevel(ServerPlayerEntity p_187243_1_)private voidsendPlayerPermissionLevel(ServerPlayerEntity p_187245_1_, int p_187245_2_)voidsetAllowCheatsForAllPlayers(boolean p_72387_1_)voidsetLevel(ServerWorld p_212504_1_)voidsetOverrideGameMode(GameType p_152604_1_)voidsetUsingWhiteList(boolean p_72371_1_)voidsetViewDistance(int p_217884_1_)voidtick()protected voidupdateEntireScoreboard(ServerScoreboard p_96456_1_, ServerPlayerEntity p_96456_2_)private voidupdatePlayerGameMode(ServerPlayerEntity p_72381_1_, ServerPlayerEntity p_72381_2_, ServerWorld p_72381_3_)
-
-
-
Field Detail
-
USERBANLIST_FILE
public static final java.io.File USERBANLIST_FILE
-
IPBANLIST_FILE
public static final java.io.File IPBANLIST_FILE
-
OPLIST_FILE
public static final java.io.File OPLIST_FILE
-
WHITELIST_FILE
public static final java.io.File WHITELIST_FILE
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
BAN_DATE_FORMAT
private static final java.text.SimpleDateFormat BAN_DATE_FORMAT
-
server
private final MinecraftServer server
-
players
private final java.util.List<ServerPlayerEntity> players
-
playersByUUID
private final java.util.Map<java.util.UUID,ServerPlayerEntity> playersByUUID
-
bans
private final BanList bans
-
ipBans
private final IPBanList ipBans
-
ops
private final OpList ops
-
whitelist
private final WhiteList whitelist
-
stats
private final java.util.Map<java.util.UUID,ServerStatisticsManager> stats
-
advancements
private final java.util.Map<java.util.UUID,PlayerAdvancements> advancements
-
playerIo
private final PlayerData playerIo
-
doWhiteList
private boolean doWhiteList
-
registryHolder
private final DynamicRegistries.Impl registryHolder
-
maxPlayers
protected final int maxPlayers
-
viewDistance
private int viewDistance
-
overrideGameMode
private GameType overrideGameMode
-
allowCheatsForAllPlayers
private boolean allowCheatsForAllPlayers
-
sendAllPlayerInfoIn
private int sendAllPlayerInfoIn
-
playersView
private final java.util.List<ServerPlayerEntity> playersView
-
-
Constructor Detail
-
PlayerList
public PlayerList(MinecraftServer p_i231425_1_, DynamicRegistries.Impl p_i231425_2_, PlayerData p_i231425_3_, int p_i231425_4_)
-
-
Method Detail
-
placeNewPlayer
public void placeNewPlayer(NetworkManager p_72355_1_, ServerPlayerEntity p_72355_2_)
-
updateEntireScoreboard
protected void updateEntireScoreboard(ServerScoreboard p_96456_1_, ServerPlayerEntity p_96456_2_)
-
setLevel
public void setLevel(ServerWorld p_212504_1_)
-
load
@Nullable public CompoundNBT load(ServerPlayerEntity p_72380_1_)
-
save
protected void save(ServerPlayerEntity p_72391_1_)
-
remove
public void remove(ServerPlayerEntity p_72367_1_)
-
canPlayerLogin
@Nullable public ITextComponent canPlayerLogin(java.net.SocketAddress p_206258_1_, com.mojang.authlib.GameProfile p_206258_2_)
-
getPlayerForLogin
public ServerPlayerEntity getPlayerForLogin(com.mojang.authlib.GameProfile p_148545_1_)
-
respawn
public ServerPlayerEntity respawn(ServerPlayerEntity p_232644_1_, boolean p_232644_2_)
-
sendPlayerPermissionLevel
public void sendPlayerPermissionLevel(ServerPlayerEntity p_187243_1_)
-
tick
public void tick()
-
broadcastAll
public void broadcastAll(IPacket<?> p_148540_1_)
-
broadcastAll
public void broadcastAll(IPacket<?> p_232642_1_, RegistryKey<World> p_232642_2_)
-
broadcastToTeam
public void broadcastToTeam(PlayerEntity p_177453_1_, ITextComponent p_177453_2_)
-
broadcastToAllExceptTeam
public void broadcastToAllExceptTeam(PlayerEntity p_177452_1_, ITextComponent p_177452_2_)
-
getPlayerNamesArray
public java.lang.String[] getPlayerNamesArray()
-
getBans
public BanList getBans()
-
getIpBans
public IPBanList getIpBans()
-
op
public void op(com.mojang.authlib.GameProfile p_152605_1_)
-
deop
public void deop(com.mojang.authlib.GameProfile p_152610_1_)
-
sendPlayerPermissionLevel
private void sendPlayerPermissionLevel(ServerPlayerEntity p_187245_1_, int p_187245_2_)
-
isWhiteListed
public boolean isWhiteListed(com.mojang.authlib.GameProfile p_152607_1_)
-
isOp
public boolean isOp(com.mojang.authlib.GameProfile p_152596_1_)
-
getPlayerByName
@Nullable public ServerPlayerEntity getPlayerByName(java.lang.String p_152612_1_)
-
broadcast
public void broadcast(@Nullable PlayerEntity p_148543_1_, double p_148543_2_, double p_148543_4_, double p_148543_6_, double p_148543_8_, RegistryKey<World> p_148543_10_, IPacket<?> p_148543_11_)
-
saveAll
public void saveAll()
-
getWhiteList
public WhiteList getWhiteList()
-
getWhiteListNames
public java.lang.String[] getWhiteListNames()
-
getOps
public OpList getOps()
-
getOpNames
public java.lang.String[] getOpNames()
-
reloadWhiteList
public void reloadWhiteList()
-
sendLevelInfo
public void sendLevelInfo(ServerPlayerEntity p_72354_1_, ServerWorld p_72354_2_)
-
sendAllPlayerInfo
public void sendAllPlayerInfo(ServerPlayerEntity p_72385_1_)
-
getPlayerCount
public int getPlayerCount()
-
getMaxPlayers
public int getMaxPlayers()
-
isUsingWhitelist
public boolean isUsingWhitelist()
-
setUsingWhiteList
public void setUsingWhiteList(boolean p_72371_1_)
-
getPlayersWithAddress
public java.util.List<ServerPlayerEntity> getPlayersWithAddress(java.lang.String p_72382_1_)
-
getViewDistance
public int getViewDistance()
-
getServer
public MinecraftServer getServer()
-
getSingleplayerData
public CompoundNBT getSingleplayerData()
-
setOverrideGameMode
public void setOverrideGameMode(GameType p_152604_1_)
-
updatePlayerGameMode
private void updatePlayerGameMode(ServerPlayerEntity p_72381_1_, @Nullable ServerPlayerEntity p_72381_2_, ServerWorld p_72381_3_)
-
setAllowCheatsForAllPlayers
public void setAllowCheatsForAllPlayers(boolean p_72387_1_)
-
removeAll
public void removeAll()
-
broadcastMessage
public void broadcastMessage(ITextComponent p_232641_1_, ChatType p_232641_2_, java.util.UUID p_232641_3_)
-
getPlayerStats
public ServerStatisticsManager getPlayerStats(PlayerEntity p_152602_1_)
-
getPlayerAdvancements
public PlayerAdvancements getPlayerAdvancements(ServerPlayerEntity p_192054_1_)
-
setViewDistance
public void setViewDistance(int p_217884_1_)
-
getPlayers
public java.util.List<ServerPlayerEntity> getPlayers()
-
getPlayer
@Nullable public ServerPlayerEntity getPlayer(java.util.UUID p_177451_1_)
-
canBypassPlayerLimit
public boolean canBypassPlayerLimit(com.mojang.authlib.GameProfile p_183023_1_)
-
reloadResources
public void reloadResources()
-
isAllowCheatsForAllPlayers
public boolean isAllowCheatsForAllPlayers()
-
addPlayer
public boolean addPlayer(ServerPlayerEntity player)
-
removePlayer
public boolean removePlayer(ServerPlayerEntity player)
-
-