|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultPlayerAccount
public class DefaultPlayerAccount
| Field Summary | |
|---|---|
protected long |
accountExpiration
|
protected java.lang.String |
accountName
|
protected SHashSet<java.lang.String> |
acctFlags
|
protected static java.lang.String[] |
CODES
|
protected java.lang.String |
email
|
protected MOB |
fakePlayerM
|
protected SHashSet<java.lang.String> |
friends
|
protected SHashSet<java.lang.String> |
ignored
|
protected long |
LastDateTime
|
protected java.lang.String |
lastIP
|
protected long |
lastUpdated
|
protected java.lang.String |
notes
|
protected java.lang.String |
Password
|
protected SVector<java.lang.String> |
players
|
protected SVector<PlayerLibrary.ThinPlayer> |
thinPlayers
|
protected java.lang.String[] |
xtraValues
|
| Fields inherited from interface com.planet_ink.coffee_mud.Common.interfaces.PlayerAccount |
|---|
FLAG_ACCOUNTMENUSOFF, FLAG_ANSI, FLAG_CANEXPORT, FLAG_DESCS, FLAG_MAXCONNSOVERRIDE, FLAG_NOEXPIRE, FLAG_NUMCHARSOVERRIDE |
| Constructor Summary | |
|---|---|
DefaultPlayerAccount()
|
|
| Method Summary | |
|---|---|
java.lang.String |
accountName()
Returns this accounts name |
void |
addNewPlayer(MOB mob)
Adds a new player to this account. |
int |
compareTo(CMObject o)
|
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
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 |
long |
getAccountExpiration()
If the ACCOUNT system is used, this returns the time, in milis since 1970, that this account will expire (meaning the player will no longer be able to log in) |
MOB |
getAccountMob()
Retrieves a fake account mob, for forum and other access systems not directly relayed to gameplay. |
protected int |
getCodeNum(java.lang.String code)
|
java.lang.String |
getEmail()
Returns the players email address, if available. |
java.util.Set<java.lang.String> |
getFriends()
Returns a modifiable HashSet that contains the set of player Names that constitutes this players friends. |
SHashSet<java.lang.String> |
getHashFrom(java.lang.String str)
|
java.util.Set<java.lang.String> |
getIgnored()
Returns a modifiable HashSet that contains the set of player Names that constitutes this players ignored player list. |
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. |
protected java.lang.String |
getPrivateList(java.util.Set<java.lang.String> h)
|
int |
getSaveStatIndex()
Returns the index into the stat codes array where extra savable fields begins. |
java.lang.String |
getStat(java.lang.String code)
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. |
java.lang.String[] |
getStatCodes()
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders. |
java.util.Enumeration<PlayerLibrary.ThinPlayer> |
getThinPlayers()
Return an enumeration of the semi-loaded players that belong to this account. |
java.lang.String |
getXML()
Returns an XML representation of all the data in this object, for persistant storage. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
void |
initializeClass()
Called ONCE after all objects are loaded, but before the map is read in during initialization. |
boolean |
isSet(java.lang.String flagName)
Checks whether the given string flag is set for this account. |
boolean |
isStat(java.lang.String code)
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. |
long |
lastDateTime()
The time, in milis since 1970, that the player last logged off. |
java.lang.String |
lastIP()
The last IP address this player logged in from. |
long |
lastUpdated()
The time, in milis since 1970, that the player was last saved. |
CMObject |
newInstance()
Returns a new instance of this class. |
java.lang.String |
notes()
Returns the administrative notes entered about this player. |
int |
numPlayers()
Returns the number of players this account currently has listed. |
java.lang.String |
password()
Returns the players password. |
boolean |
sameAs(PlayerAccount E)
|
void |
setAccountExpiration(long newVal)
If the ACCOUNT system is used, this sets the time, in milis since 1970, that this account will expire (meaning the player will no longer be able to log in) |
void |
setAccountName(java.lang.String name)
Sets this accounts unique name |
void |
setEmail(java.lang.String newAdd)
Sets the players email address, if available. |
void |
setFlag(java.lang.String flagName,
boolean setOrUnset)
Sets or unsets an account-wide flag. |
void |
setLastDateTime(long C)
Sets the time, in milis since 1970, that the player last logged off. |
void |
setLastIP(java.lang.String ip)
Sets the last IP address this player logged in from. |
void |
setLastUpdated(long time)
Sets the time, in milis since 1970, that the player was last saved. |
void |
setNotes(java.lang.String newnotes)
Sets the administrative notes entered about this player. |
void |
setPassword(java.lang.String newPassword)
Sets the players password. |
void |
setPlayerNames(java.util.Vector<java.lang.String> names)
Sets the names of all the players that belong to this account |
void |
setStat(java.lang.String code,
java.lang.String val)
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. |
void |
setXML(java.lang.String str)
Restores the data in this object from an XML document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SHashSet<java.lang.String> friends
protected SHashSet<java.lang.String> ignored
protected SVector<java.lang.String> players
protected SVector<PlayerLibrary.ThinPlayer> thinPlayers
protected java.lang.String accountName
protected java.lang.String lastIP
protected long LastDateTime
protected long lastUpdated
protected java.lang.String email
protected java.lang.String Password
protected java.lang.String notes
protected long accountExpiration
protected java.lang.String[] xtraValues
protected SHashSet<java.lang.String> acctFlags
protected volatile MOB fakePlayerM
protected static java.lang.String[] CODES
| Constructor Detail |
|---|
public DefaultPlayerAccount()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String getStat(java.lang.String code)
Modifiable
getStat in interface Modifiablecode - the name of the field to read.
Modifiable.getStatCodes()
public void setStat(java.lang.String code,
java.lang.String val)
Modifiable
setStat in interface Modifiablecode - the name of the field to setval - the value to set the field toModifiable.getStatCodes()public int getSaveStatIndex()
Modifiable
getSaveStatIndex in interface ModifiableModifiable.getStatCodes(),
Modifiable.getStat(String),
Modifiable.setStat(String, String)public java.lang.String[] getStatCodes()
Modifiable
getStatCodes in interface ModifiableModifiable.getStat(String),
Modifiable.setStat(String, String)public boolean isStat(java.lang.String code)
Modifiable
isStat in interface Modifiablecode - the name of the field to read.
Modifiable.getStatCodes()protected int getCodeNum(java.lang.String code)
public boolean sameAs(PlayerAccount E)
public CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic java.lang.String lastIP()
AccountStats
lastIP in interface AccountStatsAccountStats.setLastIP(String)public void setLastIP(java.lang.String ip)
AccountStats
setLastIP in interface AccountStatsip - the last IP address this player logged in from.AccountStats.lastIP()public java.lang.String getEmail()
AccountStats
getEmail in interface AccountStatsAccountStats.setEmail(String)public void setEmail(java.lang.String newAdd)
AccountStats
setEmail in interface AccountStatsnewAdd - the players email address, if available.AccountStats.getEmail()public long lastUpdated()
AccountStats
lastUpdated in interface AccountStatsAccountStats.setLastUpdated(long)public void setLastUpdated(long time)
AccountStats
setLastUpdated in interface AccountStatstime - the time, in milis since 1970, that the player was last saved.AccountStats.lastUpdated()public long lastDateTime()
AccountStats
lastDateTime in interface AccountStatsAccountStats.setLastDateTime(long)public void setLastDateTime(long C)
AccountStats
setLastDateTime in interface AccountStatsC - the time, in milis since 1970, that the player last logged off.AccountStats.lastDateTime()public java.lang.String password()
AccountStats
password in interface AccountStatsAccountStats.setPassword(String)public void setPassword(java.lang.String newPassword)
AccountStats
setPassword in interface AccountStatsnewPassword - the players password.AccountStats.password()public java.lang.String notes()
AccountStats
notes in interface AccountStatsAccountStats.setNotes(String)public void setNotes(java.lang.String newnotes)
AccountStats
setNotes in interface AccountStatsnewnotes - the administrative notes entered about this player.AccountStats.notes()public SHashSet<java.lang.String> getHashFrom(java.lang.String str)
public java.util.Set<java.lang.String> getFriends()
AccountStats
getFriends in interface AccountStatspublic java.util.Set<java.lang.String> getIgnored()
AccountStats
getIgnored in interface AccountStatspublic MOB getAccountMob()
PlayerAccount
getAccountMob in interface PlayerAccountprotected java.lang.String getPrivateList(java.util.Set<java.lang.String> h)
public java.lang.String getXML()
AccountStats
getXML in interface AccountStatsAccountStats.setXML(String)public void setXML(java.lang.String str)
AccountStats
setXML in interface AccountStatsstr - an XML representation of all the data in this objectAccountStats.getXML()public long getAccountExpiration()
AccountStats
getAccountExpiration in interface AccountStatsAccountStats.setAccountExpiration(long)public void setAccountExpiration(long newVal)
AccountStats
setAccountExpiration in interface AccountStatsnewVal - the time, in milis, that this player expires.AccountStats.getAccountExpiration()public java.lang.String accountName()
PlayerAccount
accountName in interface PlayerAccountpublic void setAccountName(java.lang.String name)
PlayerAccount
setAccountName in interface PlayerAccountname - the accounts namepublic void addNewPlayer(MOB mob)
PlayerAccount
addNewPlayer in interface PlayerAccountmob - the new player to add.public java.lang.String findPlayer(java.lang.String name)
PlayerAccount
findPlayer in interface PlayerAccountname - the name look for check
public void delPlayer(java.lang.String name)
PlayerAccount
delPlayer in interface PlayerAccountname - the name of the player to remove.public void delPlayer(MOB mob)
PlayerAccount
delPlayer in interface PlayerAccountmob - the player to delete.public java.util.Enumeration<MOB> getLoadPlayers()
PlayerAccount
getLoadPlayers in interface PlayerAccountpublic java.util.Enumeration<PlayerLibrary.ThinPlayer> getThinPlayers()
PlayerAccount
getThinPlayers in interface PlayerAccountpublic java.util.Enumeration<java.lang.String> getPlayers()
PlayerAccount
getPlayers in interface PlayerAccountpublic void setPlayerNames(java.util.Vector<java.lang.String> names)
PlayerAccount
setPlayerNames in interface PlayerAccountnames - the names of the playerspublic int numPlayers()
PlayerAccount
numPlayers in interface PlayerAccountpublic boolean isSet(java.lang.String flagName)
PlayerAccount
isSet in interface PlayerAccountflagName - the flag name
PlayerAccount.setFlag(String, boolean)
public void setFlag(java.lang.String flagName,
boolean setOrUnset)
PlayerAccount
setFlag in interface PlayerAccountflagName - the flag namesetOrUnset - true to set it, false to unsetPlayerAccount.isSet(String)public int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||