com.planet_ink.coffee_mud.Common.interfaces
Interface PlayerAccount

All Superinterfaces:
AccountStats, java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>, Modifiable
All Known Implementing Classes:
DefaultPlayerAccount

public interface PlayerAccount
extends CMCommon, AccountStats, Modifiable

An interface for a base player account. If this system is enabled, this represents essentially a "container" for various characters, who share a login and potentially an expiration date.


Field Summary
static java.lang.String FLAG_ACCOUNTMENUSOFF
          Constant for account flags that overrides account expiration
static java.lang.String FLAG_ANSI
          Constant for account flags that overrides account expiration
static java.lang.String FLAG_CANEXPORT
          Constant for account flags that overrides account expiration
static java.lang.String[] FLAG_DESCS
          list of account flags
static java.lang.String FLAG_MAXCONNSOVERRIDE
          Constant for account flags that overrides account expiration
static java.lang.String FLAG_NOEXPIRE
          Constant for account flags that overrides account expiration
static java.lang.String FLAG_NUMCHARSOVERRIDE
          Constant for account flags that overrides number of characters limitation
 
Method Summary
 java.lang.String accountName()
          Returns this accounts name
 void addNewPlayer(MOB mob)
          Adds a new player to this account.
 void delPlayer(MOB mob)
          Removes a player from this account.
 void delPlayer(java.lang.String name)
          Removes a player of this name from this account.
 java.lang.String findPlayer(java.lang.String name)
          Returns the real name if the player is on this account
 MOB getAccountMob()
          Retrieves a fake account mob, for forum and other access systems not directly relayed to gameplay.
 java.util.Enumeration<MOB> getLoadPlayers()
          Return an enumeration of the fully loaded players that belong to this account.
 java.util.Enumeration<java.lang.String> getPlayers()
          Return an enumeration of the players names that belong to this account.
 java.util.Enumeration<PlayerLibrary.ThinPlayer> getThinPlayers()
          Return an enumeration of the semi-loaded players that belong to this account.
 boolean isSet(java.lang.String flagName)
          Checks whether the given string flag is set for this account.
 int numPlayers()
          Returns the number of players this account currently has listed.
 void setAccountName(java.lang.String name)
          Sets this accounts unique name
 void setFlag(java.lang.String flagName, boolean setOrUnset)
          Sets or unsets an account-wide flag.
 void setPlayerNames(java.util.Vector<java.lang.String> names)
          Sets the names of all the players that belong to this account
 
Methods inherited from interface com.planet_ink.coffee_mud.Common.interfaces.AccountStats
getAccountExpiration, getEmail, getFriends, getIgnored, getXML, lastDateTime, lastIP, lastUpdated, notes, password, setAccountExpiration, setEmail, setLastDateTime, setLastIP, setLastUpdated, setNotes, setPassword, setXML
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Modifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 

Field Detail

FLAG_NUMCHARSOVERRIDE

static final java.lang.String FLAG_NUMCHARSOVERRIDE
Constant for account flags that overrides number of characters limitation

See Also:
Constant Field Values

FLAG_NOEXPIRE

static final java.lang.String FLAG_NOEXPIRE
Constant for account flags that overrides account expiration

See Also:
Constant Field Values

FLAG_CANEXPORT

static final java.lang.String FLAG_CANEXPORT
Constant for account flags that overrides account expiration

See Also:
Constant Field Values

FLAG_MAXCONNSOVERRIDE

static final java.lang.String FLAG_MAXCONNSOVERRIDE
Constant for account flags that overrides account expiration

See Also:
Constant Field Values

FLAG_ANSI

static final java.lang.String FLAG_ANSI
Constant for account flags that overrides account expiration

See Also:
Constant Field Values

FLAG_ACCOUNTMENUSOFF

static final java.lang.String FLAG_ACCOUNTMENUSOFF
Constant for account flags that overrides account expiration

See Also:
Constant Field Values

FLAG_DESCS

static final java.lang.String[] FLAG_DESCS
list of account flags

Method Detail

getLoadPlayers

java.util.Enumeration<MOB> getLoadPlayers()
Return an enumeration of the fully loaded players that belong to this account.

Returns:
an enumeration of player mob objects

getThinPlayers

java.util.Enumeration<PlayerLibrary.ThinPlayer> getThinPlayers()
Return an enumeration of the semi-loaded players that belong to this account.

Returns:
an enumeration of thinplayer objects

numPlayers

int numPlayers()
Returns the number of players this account currently has listed.

Returns:
the number of players

getPlayers

java.util.Enumeration<java.lang.String> getPlayers()
Return an enumeration of the players names that belong to this account.

Returns:
an enumeration of player names

addNewPlayer

void addNewPlayer(MOB mob)
Adds a new player to this account.

Parameters:
mob - the new player to add.

delPlayer

void delPlayer(MOB mob)
Removes a player from this account. This is typically a precursor to deleting the player.

Parameters:
mob - the player to delete.

delPlayer

void delPlayer(java.lang.String name)
Removes a player of this name from this account.

Parameters:
name - the name of the player to remove.

getAccountMob

MOB getAccountMob()
Retrieves a fake account mob, for forum and other access systems not directly relayed to gameplay.

Returns:
mob the fake player.

findPlayer

java.lang.String findPlayer(java.lang.String name)
Returns the real name if the player is on this account

Parameters:
name - the name look for check
Returns:
real name if it exists and null otherwise

accountName

java.lang.String accountName()
Returns this accounts name

Returns:
this accounts name

setAccountName

void setAccountName(java.lang.String name)
Sets this accounts unique name

Parameters:
name - the accounts name

setPlayerNames

void setPlayerNames(java.util.Vector<java.lang.String> names)
Sets the names of all the players that belong to this account

Parameters:
names - the names of the players

isSet

boolean isSet(java.lang.String flagName)
Checks whether the given string flag is set for this account.

Parameters:
flagName - the flag name
Returns:
true if it is set, false if not
See Also:
setFlag(String, boolean)

setFlag

void setFlag(java.lang.String flagName,
             boolean setOrUnset)
Sets or unsets an account-wide flag.

Parameters:
flagName - the flag name
setOrUnset - true to set it, false to unset
See Also:
isSet(String)