com.planet_ink.coffee_mud.Common.interfaces
Interface PlayerAccount

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

public interface PlayerAccount
extends CMCommon, AccountStats, Modifiable, Tattooable

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.


Nested Class Summary
static class PlayerAccount.AccountFlag
          Various account-level flags
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.AccountStats
AccountStats.Agent, AccountStats.PrideStat
 
Method Summary
 void addNewPlayer(MOB mob)
          Adds a new player to this account.
 void copyInto(PlayerAccount otherAccount)
          Populates this account object with all the data from the given one, replacing any existing internal data.
 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.lang.String getAccountName()
          Returns this accounts name
 int getBonusCharsLimit()
          Returns the number of bonus characters available to this account.
 int getBonusCharsOnlineLimit()
          Returns the number of bonus characters online available to this account.
 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(PlayerAccount.AccountFlag flag)
          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 setBonusCharsLimit(int bonus)
          Sets the number of bonus characters available to this account.
 void setBonusCharsOnlineLimit(int bonus)
          Sets the number of bonus characters online available to this account.
 void setFlag(PlayerAccount.AccountFlag flag, boolean setOrUnset)
          Sets or unsets an account-wide flag.
 void setPlayerNames(java.util.List<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
bumpPrideStat, getAccountExpiration, getAchievementTracker, getBonusCharStatPoints, getBonusCommonSkillLimits, getBonusCraftingSkillLimits, getBonusLanguageLimits, getBonusNonCraftingSkillLimits, getEmail, getFriends, getIgnored, getLastDateTime, getLastIP, getLastUpdated, getNotes, getPasswordStr, getPrideStat, getXML, isIgnored, isIgnored, killAchievementTracker, matchesPassword, rebuildAchievementTracker, setAccountExpiration, setBonusCharStatPoints, setBonusCommonSkillLimits, setBonusCraftingSkillLimits, setBonusLanguageLimits, setBonusNonCraftingSkillLimits, setEmail, setLastDateTime, setLastIP, setLastUpdated, setNotes, setPassword, setXML
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, name, 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
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tattooable
addTattoo, addTattoo, addTattoo, delTattoo, delTattoo, findTattoo, findTattooStartsWith, tattoos
 

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

getAccountName

java.lang.String getAccountName()
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.List<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(PlayerAccount.AccountFlag flag)
Checks whether the given string flag is set for this account.

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

setFlag

void setFlag(PlayerAccount.AccountFlag flag,
             boolean setOrUnset)
Sets or unsets an account-wide flag.

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

getBonusCharsOnlineLimit

int getBonusCharsOnlineLimit()
Returns the number of bonus characters online available to this account.

Returns:
the number of bonus chars online
See Also:
setBonusCharsOnlineLimit(int)

setBonusCharsOnlineLimit

void setBonusCharsOnlineLimit(int bonus)
Sets the number of bonus characters online available to this account.

Parameters:
bonus - the number of bonus chars online
See Also:
getBonusCharsOnlineLimit()

getBonusCharsLimit

int getBonusCharsLimit()
Returns the number of bonus characters available to this account.

Returns:
the number of bonus chars
See Also:
setBonusCharsLimit(int)

setBonusCharsLimit

void setBonusCharsLimit(int bonus)
Sets the number of bonus characters available to this account.

Parameters:
bonus - the number of bonus chars
See Also:
getBonusCharsLimit()

copyInto

void copyInto(PlayerAccount otherAccount)
Populates this account object with all the data from the given one, replacing any existing internal data.

Parameters:
otherAccount - the data to copy from.