Class PlayerList

java.lang.Object
net.minecraft.server.players.PlayerList
Direct Known Subclasses:
DedicatedPlayerList, IntegratedPlayerList

public abstract class PlayerList extends Object
  • Field Details

    • USERBANLIST_FILE

      public static final File USERBANLIST_FILE
    • IPBANLIST_FILE

      public static final File IPBANLIST_FILE
    • OPLIST_FILE

      public static final File OPLIST_FILE
    • WHITELIST_FILE

      public static final 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

      private static final SimpleDateFormat BAN_DATE_FORMAT
    • server

      private final MinecraftServer server
    • players

      private final List<ServerPlayer> players
    • playersByUUID

      private final Map<UUID,​ServerPlayer> playersByUUID
    • bans

      private final UserBanList bans
    • ipBans

      private final IpBanList ipBans
    • ops

      private final ServerOpList ops
    • whitelist

      private final UserWhiteList whitelist
    • stats

      private final Map<UUID,​ServerStatsCounter> stats
    • advancements

      private final Map<UUID,​PlayerAdvancements> advancements
    • playerIo

      private final PlayerDataStorage playerIo
    • doWhiteList

      private boolean doWhiteList
    • registryHolder

      private final RegistryAccess.RegistryHolder 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

      private final List<ServerPlayer> playersView
  • Constructor Details

  • Method Details

    • placeNewPlayer

      public void placeNewPlayer(Connection p_11262_, ServerPlayer p_11263_)
    • updateEntireScoreboard

      protected void updateEntireScoreboard(ServerScoreboard p_11274_, ServerPlayer p_11275_)
    • setLevel

      public void setLevel(ServerLevel p_11220_)
    • load

      @Nullable public CompoundTag load(ServerPlayer p_11225_)
    • save

      protected void save(ServerPlayer p_11277_)
    • remove

      public void remove(ServerPlayer p_11287_)
    • canPlayerLogin

      @Nullable public Component canPlayerLogin(SocketAddress p_11257_, com.mojang.authlib.GameProfile p_11258_)
    • getPlayerForLogin

      public ServerPlayer getPlayerForLogin(com.mojang.authlib.GameProfile p_11301_)
    • respawn

      public ServerPlayer respawn(ServerPlayer p_11237_, boolean p_11238_)
    • sendPlayerPermissionLevel

      public void sendPlayerPermissionLevel(ServerPlayer p_11290_)
    • tick

      public void tick()
    • broadcastAll

      public void broadcastAll(Packet<?> p_11269_)
    • broadcastAll

      public void broadcastAll(Packet<?> p_11271_, ResourceKey<Level> p_11272_)
    • broadcastToTeam

      public void broadcastToTeam(Player p_11250_, Component p_11251_)
    • broadcastToAllExceptTeam

      public void broadcastToAllExceptTeam(Player p_11279_, Component p_11280_)
    • getPlayerNamesArray

      public String[] getPlayerNamesArray()
    • getBans

      public UserBanList getBans()
    • getIpBans

      public IpBanList getIpBans()
    • op

      public void op(com.mojang.authlib.GameProfile p_11254_)
    • deop

      public void deop(com.mojang.authlib.GameProfile p_11281_)
    • sendPlayerPermissionLevel

      private void sendPlayerPermissionLevel(ServerPlayer p_11227_, int p_11228_)
    • isWhiteListed

      public boolean isWhiteListed(com.mojang.authlib.GameProfile p_11294_)
    • isOp

      public boolean isOp(com.mojang.authlib.GameProfile p_11304_)
    • getPlayerByName

      @Nullable public ServerPlayer getPlayerByName(String p_11256_)
    • 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

      public UserWhiteList getWhiteList()
    • getWhiteListNames

      public String[] getWhiteListNames()
    • getOps

      public ServerOpList getOps()
    • getOpNames

      public String[] getOpNames()
    • reloadWhiteList

      public void reloadWhiteList()
    • sendLevelInfo

      public void sendLevelInfo(ServerPlayer p_11230_, ServerLevel p_11231_)
    • sendAllPlayerInfo

      public void sendAllPlayerInfo(ServerPlayer p_11293_)
    • getPlayerCount

      public int getPlayerCount()
    • getMaxPlayers

      public int getMaxPlayers()
    • isUsingWhitelist

      public boolean isUsingWhitelist()
    • setUsingWhiteList

      public void setUsingWhiteList(boolean p_11276_)
    • getPlayersWithAddress

      public List<ServerPlayer> getPlayersWithAddress(String p_11283_)
    • getViewDistance

      public int getViewDistance()
    • getServer

      public MinecraftServer getServer()
    • getSingleplayerData

      public CompoundTag getSingleplayerData()
    • setAllowCheatsForAllPlayers

      public void setAllowCheatsForAllPlayers(boolean p_11285_)
    • removeAll

      public void removeAll()
    • broadcastMessage

      public void broadcastMessage(Component p_11265_, ChatType p_11266_, UUID p_11267_)
    • broadcastMessage

      public void broadcastMessage(Component p_143992_, Function<ServerPlayer,​Component> p_143993_, ChatType p_143994_, UUID p_143995_)
    • getPlayerStats

      public ServerStatsCounter getPlayerStats(Player p_11240_)
    • getPlayerAdvancements

      public PlayerAdvancements getPlayerAdvancements(ServerPlayer p_11297_)
    • setViewDistance

      public void setViewDistance(int p_11218_)
    • getPlayers

      public List<ServerPlayer> getPlayers()
    • getPlayer

      @Nullable public ServerPlayer getPlayer(UUID p_11260_)
    • canBypassPlayerLimit

      public boolean canBypassPlayerLimit(com.mojang.authlib.GameProfile p_11298_)
    • reloadResources

      public void reloadResources()
    • isAllowCheatsForAllPlayers

      public boolean isAllowCheatsForAllPlayers()
    • addPlayer

      public boolean addPlayer(ServerPlayer player)
    • removePlayer

      public boolean removePlayer(ServerPlayer player)