public abstract class PlayerList
extends java.lang.Object
修飾子とタイプ | フィールドと説明 |
---|---|
static java.io.File |
FILE_IPBANS |
static java.io.File |
FILE_OPS |
static java.io.File |
FILE_PLAYERBANS |
static java.io.File |
FILE_WHITELIST |
protected int |
maxPlayers |
コンストラクタと説明 |
---|
PlayerList(MinecraftServer p_i50688_1_,
int p_i50688_2_) |
修飾子とタイプ | メソッドと説明 |
---|---|
void |
addOp(com.mojang.authlib.GameProfile profile) |
boolean |
addPlayer(ServerPlayerEntity player) |
boolean |
bypassesPlayerLimit(com.mojang.authlib.GameProfile profile) |
boolean |
canJoin(com.mojang.authlib.GameProfile profile) |
ITextComponent |
canPlayerLogin(java.net.SocketAddress p_206258_1_,
com.mojang.authlib.GameProfile p_206258_2_) |
boolean |
canSendCommands(com.mojang.authlib.GameProfile profile) |
boolean |
commandsAllowedForAll() |
ServerPlayerEntity |
createPlayerForUser(com.mojang.authlib.GameProfile profile)
also checks for multiple logins across servers
|
void |
func_212504_a(ServerWorld p_212504_1_) |
IPBanList |
getBannedIPs() |
BanList |
getBannedPlayers() |
int |
getCurrentPlayerCount()
Returns the number of players currently on the server.
|
CompoundNBT |
getHostPlayerData()
On integrated servers, returns the host's player data to be written to level.dat.
|
int |
getMaxPlayers()
Returns the maximum number of players allowed on the server.
|
java.lang.String[] |
getOnlinePlayerNames()
Returns an array of the usernames of all the connected players.
|
java.lang.String[] |
getOppedPlayerNames() |
OpList |
getOppedPlayers() |
PlayerAdvancements |
getPlayerAdvancements(ServerPlayerEntity p_192054_1_) |
ServerPlayerEntity |
getPlayerByUsername(java.lang.String username) |
ServerPlayerEntity |
getPlayerByUUID(java.util.UUID playerUUID)
Get's the EntityPlayerMP object representing the player with the UUID.
|
java.util.List<ServerPlayerEntity> |
getPlayers() |
java.util.List<ServerPlayerEntity> |
getPlayersMatchingAddress(java.lang.String address) |
ServerStatisticsManager |
getPlayerStats(PlayerEntity playerIn) |
MinecraftServer |
getServer() |
int |
getViewDistance()
Gets the view distance, in chunks.
|
java.lang.String[] |
getWhitelistedPlayerNames() |
WhiteList |
getWhitelistedPlayers() |
void |
initializeConnectionToPlayer(NetworkManager netManager,
ServerPlayerEntity playerIn) |
boolean |
isWhiteListEnabled() |
void |
playerLoggedOut(ServerPlayerEntity playerIn)
Called when a player disconnects from the game.
|
CompoundNBT |
readPlayerDataFromFile(ServerPlayerEntity playerIn)
called during player login. reads the player information from disk.
|
ServerPlayerEntity |
recreatePlayerEntity(ServerPlayerEntity playerIn,
DimensionType dimension,
boolean conqueredEnd)
Destroys the given player entity and recreates another in the given dimension.
|
void |
reloadResources() |
void |
reloadWhitelist() |
void |
removeAllPlayers()
Kicks everyone with "Server closed" as reason.
|
void |
removeOp(com.mojang.authlib.GameProfile profile) |
boolean |
removePlayer(ServerPlayerEntity player) |
void |
saveAllPlayerData()
Saves all of the players' current states.
|
void |
sendInventory(ServerPlayerEntity playerIn)
sends the players inventory to himself
|
void |
sendMessage(ITextComponent component)
Sends the given string to every player as chat message.
|
void |
sendMessage(ITextComponent component,
boolean isSystem) |
void |
sendMessageToAllTeamMembers(PlayerEntity player,
ITextComponent message) |
void |
sendMessageToTeamOrAllPlayers(PlayerEntity player,
ITextComponent message) |
void |
sendPacketToAllPlayers(IPacket<?> packetIn) |
void |
sendPacketToAllPlayersInDimension(IPacket<?> packetIn,
DimensionType dimension) |
protected void |
sendScoreboard(ServerScoreboard scoreboardIn,
ServerPlayerEntity playerIn) |
void |
sendToAllNearExcept(PlayerEntity except,
double x,
double y,
double z,
double radius,
DimensionType dimension,
IPacket<?> packetIn)
params: srcPlayer,x,y,z,r,dimension.
|
void |
sendWorldInfo(ServerPlayerEntity playerIn,
ServerWorld worldIn)
Updates the time and weather for the given player to those of the given world
|
void |
setCommandsAllowedForAll(boolean p_72387_1_)
Sets whether all players are allowed to use commands (cheats) on the server.
|
void |
setGameType(GameType gameModeIn) |
void |
setViewDistance(int viewDistanceIn) |
void |
setWhiteListEnabled(boolean whitelistEnabled) |
void |
tick()
self explanitory
|
void |
updatePermissionLevel(ServerPlayerEntity player) |
protected void |
writePlayerData(ServerPlayerEntity playerIn)
also stores the NBTTags if this is an intergratedPlayerList
|
public static final java.io.File FILE_PLAYERBANS
public static final java.io.File FILE_IPBANS
public static final java.io.File FILE_OPS
public static final java.io.File FILE_WHITELIST
protected final int maxPlayers
public PlayerList(MinecraftServer p_i50688_1_, int p_i50688_2_)
public void initializeConnectionToPlayer(NetworkManager netManager, ServerPlayerEntity playerIn)
protected void sendScoreboard(ServerScoreboard scoreboardIn, ServerPlayerEntity playerIn)
public void func_212504_a(ServerWorld p_212504_1_)
@Nullable public CompoundNBT readPlayerDataFromFile(ServerPlayerEntity playerIn)
protected void writePlayerData(ServerPlayerEntity playerIn)
public void playerLoggedOut(ServerPlayerEntity playerIn)
@Nullable public ITextComponent canPlayerLogin(java.net.SocketAddress p_206258_1_, com.mojang.authlib.GameProfile p_206258_2_)
public ServerPlayerEntity createPlayerForUser(com.mojang.authlib.GameProfile profile)
public ServerPlayerEntity recreatePlayerEntity(ServerPlayerEntity playerIn, DimensionType dimension, boolean conqueredEnd)
public void updatePermissionLevel(ServerPlayerEntity player)
public void tick()
public void sendPacketToAllPlayers(IPacket<?> packetIn)
public void sendPacketToAllPlayersInDimension(IPacket<?> packetIn, DimensionType dimension)
public void sendMessageToAllTeamMembers(PlayerEntity player, ITextComponent message)
public void sendMessageToTeamOrAllPlayers(PlayerEntity player, ITextComponent message)
public java.lang.String[] getOnlinePlayerNames()
public BanList getBannedPlayers()
public IPBanList getBannedIPs()
public void addOp(com.mojang.authlib.GameProfile profile)
public void removeOp(com.mojang.authlib.GameProfile profile)
public boolean canJoin(com.mojang.authlib.GameProfile profile)
public boolean canSendCommands(com.mojang.authlib.GameProfile profile)
@Nullable public ServerPlayerEntity getPlayerByUsername(java.lang.String username)
public void sendToAllNearExcept(@Nullable PlayerEntity except, double x, double y, double z, double radius, DimensionType dimension, IPacket<?> packetIn)
public void saveAllPlayerData()
public WhiteList getWhitelistedPlayers()
public java.lang.String[] getWhitelistedPlayerNames()
public OpList getOppedPlayers()
public java.lang.String[] getOppedPlayerNames()
public void reloadWhitelist()
public void sendWorldInfo(ServerPlayerEntity playerIn, ServerWorld worldIn)
public void sendInventory(ServerPlayerEntity playerIn)
public int getCurrentPlayerCount()
public int getMaxPlayers()
public boolean isWhiteListEnabled()
public void setWhiteListEnabled(boolean whitelistEnabled)
public java.util.List<ServerPlayerEntity> getPlayersMatchingAddress(java.lang.String address)
public int getViewDistance()
public MinecraftServer getServer()
public CompoundNBT getHostPlayerData()
public void setGameType(GameType gameModeIn)
public void setCommandsAllowedForAll(boolean p_72387_1_)
public void removeAllPlayers()
public void sendMessage(ITextComponent component, boolean isSystem)
public void sendMessage(ITextComponent component)
public ServerStatisticsManager getPlayerStats(PlayerEntity playerIn)
public PlayerAdvancements getPlayerAdvancements(ServerPlayerEntity p_192054_1_)
public void setViewDistance(int viewDistanceIn)
public java.util.List<ServerPlayerEntity> getPlayers()
@Nullable public ServerPlayerEntity getPlayerByUUID(java.util.UUID playerUUID)
public boolean bypassesPlayerLimit(com.mojang.authlib.GameProfile profile)
public void reloadResources()
public boolean commandsAllowedForAll()
public boolean addPlayer(ServerPlayerEntity player)
public boolean removePlayer(ServerPlayerEntity player)