monrovia.server.core
Class Player

java.lang.Object
  |
  +--monrovia.server.core.Player
All Implemented Interfaces:
PlayerStorage.PlayerData, java.io.Serializable

public class Player
extends java.lang.Object
implements PlayerStorage.PlayerData, java.io.Serializable

Player object.

See Also:
Serialized Form

Constructor Summary
Player(int pID, java.lang.String pName)
          Deprecated. Use the version without implementation
Player(int pID, java.lang.String pImplementation, Player pPlayer)
           
Player(int pID, java.lang.String pName, java.lang.String pImplementation)
           
Player(java.lang.String pName, java.lang.String pImplementation)
           
 
Method Summary
 void check()
           
 PlayerCreature getCreature()
           
 java.lang.String getCreatureName()
          Get the name of the creature.
 int getID()
           
 java.lang.String getName()
           
 java.util.List getNeededParameters()
           
 java.util.List getOptionalParameters()
           
 java.util.Map getParameterMap()
          Get unmodifiable version of the parameter map.
 java.lang.Class getParameterType(java.lang.String pName)
          Get type for given parameter in the creature.
 java.lang.String getPassword()
          Get the password.
 int getProtocolTurn()
           
 ProtocolHandlerImpl.SocketKey getSocketKey()
           
 boolean isLogged()
           
 void setCreatureData(java.lang.String pName)
          Set information for the player creature.
 void setLogged(boolean pLogged)
           
 void setParameter(java.lang.String pName, java.lang.Object pValue)
          Set value for a parameter in the creature.
 void setPassword(java.lang.String pPassword)
          Set the password for the player.
 void setProtocolTurn(int pProtocolTurn)
           
 void setSocketKey(ProtocolHandlerImpl.SocketKey pSocketKey)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Player

public Player(java.lang.String pName,
              java.lang.String pImplementation)

Player

public Player(int pID,
              java.lang.String pName)
Deprecated. Use the version without implementation


Player

public Player(int pID,
              java.lang.String pName,
              java.lang.String pImplementation)

Player

public Player(int pID,
              java.lang.String pImplementation,
              Player pPlayer)
       throws StorageException
Method Detail

getPassword

public java.lang.String getPassword()
Description copied from interface: PlayerStorage.PlayerData
Get the password.
Specified by:
getPassword in interface PlayerStorage.PlayerData

setPassword

public void setPassword(java.lang.String pPassword)
Description copied from interface: PlayerStorage.PlayerData
Set the password for the player.

Specified by:
setPassword in interface PlayerStorage.PlayerData
Following copied from interface: monrovia.server.core.PlayerStorage.PlayerData
Parameters:
pPassword - The password

setLogged

public void setLogged(boolean pLogged)

getCreatureName

public java.lang.String getCreatureName()
                                 throws StorageException
Description copied from interface: PlayerStorage.PlayerData
Get the name of the creature.
Specified by:
getCreatureName in interface PlayerStorage.PlayerData

setCreatureData

public void setCreatureData(java.lang.String pName)
                     throws StorageException
Description copied from interface: PlayerStorage.PlayerData
Set information for the player creature.

Call this before trying to do anything for the parameters.

Specified by:
setCreatureData in interface PlayerStorage.PlayerData
Following copied from interface: monrovia.server.core.PlayerStorage.PlayerData
Parameters:
pName - The name of the creature

getParameterType

public java.lang.Class getParameterType(java.lang.String pName)
Description copied from interface: PlayerStorage.PlayerData
Get type for given parameter in the creature.

You must call setCreatureData() before calling this.

Specified by:
getParameterType in interface PlayerStorage.PlayerData
Following copied from interface: monrovia.server.core.PlayerStorage.PlayerData
Parameters:
pName - The name of the parameter
Returns:
The type or null, if there is no such parameter

getNeededParameters

public java.util.List getNeededParameters()
                                   throws StorageException

getOptionalParameters

public java.util.List getOptionalParameters()
                                     throws StorageException

getParameterMap

public java.util.Map getParameterMap()
Description copied from interface: PlayerStorage.PlayerData
Get unmodifiable version of the parameter map.
Specified by:
getParameterMap in interface PlayerStorage.PlayerData

setParameter

public void setParameter(java.lang.String pName,
                         java.lang.Object pValue)
                  throws StorageException
Description copied from interface: PlayerStorage.PlayerData
Set value for a parameter in the creature.

You must call setCreatureData() before calling this.

Specified by:
setParameter in interface PlayerStorage.PlayerData
Following copied from interface: monrovia.server.core.PlayerStorage.PlayerData
Parameters:
pName - Name of the parameter
pValue - Value of the parameter

check

public void check()
           throws StorageException

getID

public int getID()

getName

public java.lang.String getName()

isLogged

public boolean isLogged()

getCreature

public PlayerCreature getCreature()

getProtocolTurn

public int getProtocolTurn()

setProtocolTurn

public void setProtocolTurn(int pProtocolTurn)

getSocketKey

public ProtocolHandlerImpl.SocketKey getSocketKey()

setSocketKey

public void setSocketKey(ProtocolHandlerImpl.SocketKey pSocketKey)