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>
advancements
private boolean
allowCheatsForAllPlayers
private static java.text.SimpleDateFormat
BAN_DATE_FORMAT
private BanList
bans
private boolean
doWhiteList
static java.io.File
IPBANLIST_FILE
private IPBanList
ipBans
private static org.apache.logging.log4j.Logger
LOGGER
protected int
maxPlayers
static java.io.File
OPLIST_FILE
private OpList
ops
private GameType
overrideGameMode
private PlayerData
playerIo
private java.util.List<ServerPlayerEntity>
players
private java.util.Map<java.util.UUID,ServerPlayerEntity>
playersByUUID
private java.util.List<ServerPlayerEntity>
playersView
private DynamicRegistries.Impl
registryHolder
private int
sendAllPlayerInfoIn
private MinecraftServer
server
private java.util.Map<java.util.UUID,ServerStatisticsManager>
stats
static java.io.File
USERBANLIST_FILE
private int
viewDistance
private WhiteList
whitelist
static java.io.File
WHITELIST_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 boolean
addPlayer(ServerPlayerEntity player)
void
broadcast(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_)
void
broadcastAll(IPacket<?> p_148540_1_)
void
broadcastAll(IPacket<?> p_232642_1_, RegistryKey<World> p_232642_2_)
void
broadcastMessage(ITextComponent p_232641_1_, ChatType p_232641_2_, java.util.UUID p_232641_3_)
void
broadcastToAllExceptTeam(PlayerEntity p_177452_1_, ITextComponent p_177452_2_)
void
broadcastToTeam(PlayerEntity p_177453_1_, ITextComponent p_177453_2_)
boolean
canBypassPlayerLimit(com.mojang.authlib.GameProfile p_183023_1_)
ITextComponent
canPlayerLogin(java.net.SocketAddress p_206258_1_, com.mojang.authlib.GameProfile p_206258_2_)
void
deop(com.mojang.authlib.GameProfile p_152610_1_)
BanList
getBans()
IPBanList
getIpBans()
int
getMaxPlayers()
java.lang.String[]
getOpNames()
OpList
getOps()
ServerPlayerEntity
getPlayer(java.util.UUID p_177451_1_)
PlayerAdvancements
getPlayerAdvancements(ServerPlayerEntity p_192054_1_)
ServerPlayerEntity
getPlayerByName(java.lang.String p_152612_1_)
int
getPlayerCount()
ServerPlayerEntity
getPlayerForLogin(com.mojang.authlib.GameProfile p_148545_1_)
java.lang.String[]
getPlayerNamesArray()
java.util.List<ServerPlayerEntity>
getPlayers()
ServerStatisticsManager
getPlayerStats(PlayerEntity p_152602_1_)
java.util.List<ServerPlayerEntity>
getPlayersWithAddress(java.lang.String p_72382_1_)
MinecraftServer
getServer()
CompoundNBT
getSingleplayerData()
int
getViewDistance()
WhiteList
getWhiteList()
java.lang.String[]
getWhiteListNames()
boolean
isAllowCheatsForAllPlayers()
boolean
isOp(com.mojang.authlib.GameProfile p_152596_1_)
boolean
isUsingWhitelist()
boolean
isWhiteListed(com.mojang.authlib.GameProfile p_152607_1_)
CompoundNBT
load(ServerPlayerEntity p_72380_1_)
void
op(com.mojang.authlib.GameProfile p_152605_1_)
void
placeNewPlayer(NetworkManager p_72355_1_, ServerPlayerEntity p_72355_2_)
void
reloadResources()
void
reloadWhiteList()
void
remove(ServerPlayerEntity p_72367_1_)
void
removeAll()
boolean
removePlayer(ServerPlayerEntity player)
ServerPlayerEntity
respawn(ServerPlayerEntity p_232644_1_, boolean p_232644_2_)
protected void
save(ServerPlayerEntity p_72391_1_)
void
saveAll()
void
sendAllPlayerInfo(ServerPlayerEntity p_72385_1_)
void
sendLevelInfo(ServerPlayerEntity p_72354_1_, ServerWorld p_72354_2_)
void
sendPlayerPermissionLevel(ServerPlayerEntity p_187243_1_)
private void
sendPlayerPermissionLevel(ServerPlayerEntity p_187245_1_, int p_187245_2_)
void
setAllowCheatsForAllPlayers(boolean p_72387_1_)
void
setLevel(ServerWorld p_212504_1_)
void
setOverrideGameMode(GameType p_152604_1_)
void
setUsingWhiteList(boolean p_72371_1_)
void
setViewDistance(int p_217884_1_)
void
tick()
protected void
updateEntireScoreboard(ServerScoreboard p_96456_1_, ServerPlayerEntity p_96456_2_)
private void
updatePlayerGameMode(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)
-
-