Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.src
Class ServerConfigurationManager

    java.lang.Object
      net.minecraft.src.ServerConfigurationManager

Direct Known Subclasses:
  DedicatedPlayerList, IntegratedPlayerList

    public abstract class ServerConfigurationManager

extends Object

Field Summary
`static Logger` | `logger` Reference to the logger.
`List` | `playerEntityList` A list of player entities that exist on this server.

Constructor Summary
`ServerConfigurationManager(MinecraftServer par1MinecraftServer)`

Method Summary
`void` | `addOp(String par1Str)` This adds a username to the ops list, then saves the op list
`void` | `addToWhiteList(String par1Str)` Add the specified player to the white list.
`String` | `allowUserToConnect(SocketAddress par1SocketAddress, String par2Str)` checks ban-lists, then white-lists, then space for the server.
`boolean` | `areCommandsAllowed(String par1Str)` Returns true if the specific player is allowed to use commands.
`EntityPlayerMP` | `createPlayerForUser(String par1Str)` also checks for multiple logins
`void` | `func_72375_a(EntityPlayerMP par1EntityPlayerMP, WorldServer par2WorldServer)`
`String[]` | `getAllUsernames()` Returns an array of the usernames of all the connected players.
`String[]` | `getAvailablePlayerDat()` Returns an array of usernames for which player.dat exists for.
`BanList` | `getBannedIPs()`
`BanList` | `getBannedPlayers()`
`int` | `getCurrentPlayerCount()` Returns the number of players currently on the server.
`int` | `getEntityViewDistance()`
`int` | `getMaxPlayers()` Returns the maximum number of players allowed on the server.
`Set` | `getOps()`
`EntityPlayerMP` | `getPlayerForUsername(String par1Str)`
`List` | `getPlayerList(String par1Str)`
`String` | `getPlayerListAsString()` returns a string containing a comma-seperated list of player names
`MinecraftServer` | `getServerInstance()`
`NBTTagCompound` | `getTagsFromLastWrite()` gets the tags created in the last writePlayerData call
`int` | `getViewDistance()` Gets the View Distance.
`Set` | `getWhiteListedPlayers()` Returns the whitelisted players.
`void` | `initializeConnectionToPlayer(NetworkManager par1NetworkManager, EntityPlayerMP par2EntityPlayerMP)`
`boolean` | `isAllowedToLogin(String par1Str)` Determine if the player is allowed to connect based on current server settings.
`boolean` | `isWhiteListEnabled()`
`void` | `loadWhiteList()` Either does nothing, or calls readWhiteList.
`void` | `playerLoggedIn(EntityPlayerMP par1EntityPlayerMP)` Called when a player successfully logs in.
`void` | `playerLoggedOut(EntityPlayerMP par1EntityPlayerMP)` Called when a player disconnects from the game.
`void` | `readPlayerDataFromFile(EntityPlayerMP par1EntityPlayerMP)` called during player login.
`void` | `removeAllPlayers()` Kicks everyone with "Server closed" as reason.
`void` | `removeFromWhitelist(String par1Str)` Remove the specified player from the whitelist.
`void` | `removeOp(String par1Str)` This removes a username from the ops list, then saves the op list
`EntityPlayerMP` | `respawnPlayer(EntityPlayerMP par1EntityPlayerMP, int par2, boolean par3)` creates and returns a respawned player based on the provided PlayerEntity.
`void` | `saveAllPlayerData()` Saves all of the players' current states.
`void` | `sendPacketToAllPlayers(Packet par1Packet)` sends a packet to all players
`void` | `sendPacketToAllPlayersInDimension(Packet par1Packet, int par2)` Sends a packet to all players in the specified Dimension
`void` | `sendPlayerInfoToAllPlayers()` sends 1 player per tick, but only sends a player once every 600 ticks
`void` | `sendToAllNear(double par1, double par3, double par5, double par7, int par9, Packet par10Packet)` params: x,y,z,d,dimension.
`void` | `sendToAllNearExcept(EntityPlayer par1EntityPlayer, double par2, double par4, double par6, double par8, int par10, Packet par11Packet)` params: srcPlayer,x,y,z,d,dimension.
`void` | `serverUpdateMountedMovingPlayer(EntityPlayerMP par1EntityPlayerMP)` using player's dimension, update their movement when in a vehicle (e.g.
`void` | `setCommandsAllowedForAll(boolean par1)`
`void` | `setGameType(EnumGameType par1EnumGameType)`
`void` | `setPlayerManager(WorldServer[] par1ArrayOfWorldServer)` Sets the NBT manager to the one for the WorldServer given.
`void` | `setWhiteListEnabled(boolean par1)`
`void` | `syncPlayerInventory(EntityPlayerMP par1EntityPlayerMP)` sends the players inventory to himself
`void` | `transferPlayerToDimension(EntityPlayerMP par1EntityPlayerMP, int par2)`
`void` | `transferPlayerToDimension(EntityPlayerMP par1EntityPlayerMP, int par2, Teleporter teleporter)`
`void` | `updateTimeAndWeatherForPlayer(EntityPlayerMP par1EntityPlayerMP, WorldServer par2WorldServer)` Updates the time and weather for the given player to those of the given world

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### logger

    public static final Logger logger

  Reference to the logger.

### playerEntityList

    public final List playerEntityList

  A list of player entities that exist on this server.

Constructor Detail

### ServerConfigurationManager

    public ServerConfigurationManager(MinecraftServer par1MinecraftServer)

Method Detail

### initializeConnectionToPlayer

    public void initializeConnectionToPlayer(NetworkManager par1NetworkManager,
                                             EntityPlayerMP par2EntityPlayerMP)

### setPlayerManager

    public void setPlayerManager(WorldServer[] par1ArrayOfWorldServer)

  Sets the NBT manager to the one for the WorldServer given.

### func_72375_a

    public void func_72375_a(EntityPlayerMP par1EntityPlayerMP,
                             WorldServer par2WorldServer)

### getEntityViewDistance

    public int getEntityViewDistance()

### readPlayerDataFromFile

    public void readPlayerDataFromFile(EntityPlayerMP par1EntityPlayerMP)

  called during player login. reads the player information from disk.

### playerLoggedIn

    public void playerLoggedIn(EntityPlayerMP par1EntityPlayerMP)

  Called when a player successfully logs in. Reads player data from disk and inserts the player into the world.

### serverUpdateMountedMovingPlayer

    public void serverUpdateMountedMovingPlayer(EntityPlayerMP par1EntityPlayerMP)

  using player's dimension, update their movement when in a vehicle (e.g. cart, boat)

### playerLoggedOut

    public void playerLoggedOut(EntityPlayerMP par1EntityPlayerMP)

  Called when a player disconnects from the game. Writes player data to disk and removes them from the world.

### allowUserToConnect

    public String allowUserToConnect(SocketAddress par1SocketAddress,
                                     String par2Str)

  checks ban-lists, then white-lists, then space for the server. Returns null on success, or an error message

### createPlayerForUser

    public EntityPlayerMP createPlayerForUser(String par1Str)

  also checks for multiple logins

### respawnPlayer

    public EntityPlayerMP respawnPlayer(EntityPlayerMP par1EntityPlayerMP,
                                        int par2,
                                        boolean par3)

  creates and returns a respawned player based on the provided PlayerEntity. Args are the PlayerEntityMP to respawn, an INT for the dimension to respawn into (usually 0), and a boolean value that is true if the player beat the game rather than dying

### transferPlayerToDimension

    public void transferPlayerToDimension(EntityPlayerMP par1EntityPlayerMP,
                                          int par2)

### transferPlayerToDimension

    public void transferPlayerToDimension(EntityPlayerMP par1EntityPlayerMP,
                                          int par2,
                                          Teleporter teleporter)

### sendPlayerInfoToAllPlayers

    public void sendPlayerInfoToAllPlayers()

  sends 1 player per tick, but only sends a player once every 600 ticks

### sendPacketToAllPlayers

    public void sendPacketToAllPlayers(Packet par1Packet)

  sends a packet to all players

### sendPacketToAllPlayersInDimension

    public void sendPacketToAllPlayersInDimension(Packet par1Packet,
                                                  int par2)

  Sends a packet to all players in the specified Dimension

### getPlayerListAsString

    public String getPlayerListAsString()

  returns a string containing a comma-seperated list of player names

### getAllUsernames

    public String[] getAllUsernames()

  Returns an array of the usernames of all the connected players.

### getBannedPlayers

    public BanList getBannedPlayers()

### getBannedIPs

    public BanList getBannedIPs()

### addOp

    public void addOp(String par1Str)

  This adds a username to the ops list, then saves the op list

### removeOp

    public void removeOp(String par1Str)

  This removes a username from the ops list, then saves the op list

### isAllowedToLogin

    public boolean isAllowedToLogin(String par1Str)

  Determine if the player is allowed to connect based on current server settings.

### areCommandsAllowed

    public boolean areCommandsAllowed(String par1Str)

  Returns true if the specific player is allowed to use commands.

### getPlayerForUsername

    public EntityPlayerMP getPlayerForUsername(String par1Str)

### sendToAllNear

    public void sendToAllNear(double par1,
                              double par3,
                              double par5,
                              double par7,
                              int par9,
                              Packet par10Packet)

  params: x,y,z,d,dimension. The packet is sent to all players within d distance of x,y,z (d^2

### sendToAllNearExcept

    public void sendToAllNearExcept(EntityPlayer par1EntityPlayer,
                                    double par2,
                                    double par4,
                                    double par6,
                                    double par8,
                                    int par10,
                                    Packet par11Packet)

  params: srcPlayer,x,y,z,d,dimension. The packet is not sent to the srcPlayer, but all other players where dx*dx+dy*dy+dz*dz

### saveAllPlayerData

    public void saveAllPlayerData()

  Saves all of the players' current states.

### addToWhiteList

    public void addToWhiteList(String par1Str)

  Add the specified player to the white list.

### removeFromWhitelist

    public void removeFromWhitelist(String par1Str)

  Remove the specified player from the whitelist.

### getWhiteListedPlayers

    public Set getWhiteListedPlayers()

  Returns the whitelisted players.

### getOps

    public Set getOps()

### loadWhiteList

    public void loadWhiteList()

  Either does nothing, or calls readWhiteList.

### updateTimeAndWeatherForPlayer

    public void updateTimeAndWeatherForPlayer(EntityPlayerMP par1EntityPlayerMP,
                                              WorldServer par2WorldServer)

  Updates the time and weather for the given player to those of the given world

### syncPlayerInventory

    public void syncPlayerInventory(EntityPlayerMP par1EntityPlayerMP)

  sends the players inventory to himself

### getCurrentPlayerCount

    public int getCurrentPlayerCount()

  Returns the number of players currently on the server.

### getMaxPlayers

    public int getMaxPlayers()

  Returns the maximum number of players allowed on the server.

### getAvailablePlayerDat

    public String[] getAvailablePlayerDat()

  Returns an array of usernames for which player.dat exists for.

### isWhiteListEnabled

    public boolean isWhiteListEnabled()

### setWhiteListEnabled

    public void setWhiteListEnabled(boolean par1)

### getPlayerList

    public List getPlayerList(String par1Str)

### getViewDistance

    public int getViewDistance()

  Gets the View Distance.

### getServerInstance

    public MinecraftServer getServerInstance()

### getTagsFromLastWrite

    public NBTTagCompound getTagsFromLastWrite()

  gets the tags created in the last writePlayerData call

### setGameType

    public void setGameType(EnumGameType par1EnumGameType)

### setCommandsAllowedForAll

    public void setCommandsAllowedForAll(boolean par1)

### removeAllPlayers

    public void removeAllPlayers()

  Kicks everyone with "Server closed" as reason.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD