|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultPlayerStats
public class DefaultPlayerStats
| Field Summary | |
|---|---|
protected long |
accountExpiration
|
protected DVector |
alias
|
protected java.lang.String |
announceMsg
|
protected int[] |
birthday
|
protected int |
channelMask
|
protected static java.lang.String[] |
CODES
|
protected java.lang.String |
colorStr
|
protected java.lang.String |
email
|
protected java.util.HashSet |
friends
|
protected static int |
GTELL_STACK_MAX_SIZE
|
protected java.util.Vector |
gtellStack
|
protected long |
Hygiene
|
protected java.util.HashSet |
ignored
|
protected java.util.HashSet |
introductions
|
protected long |
LastDateTime
|
protected java.lang.String |
lastIP
|
protected long |
lastUpdated
|
protected DVector |
levelInfo
|
protected java.lang.String |
notes
|
protected java.lang.String |
Password
|
protected java.lang.String |
poofin
|
protected java.lang.String |
poofout
|
protected java.lang.String |
prompt
|
protected long |
replyTime
|
protected MOB |
replyTo
|
protected int |
replyType
|
protected java.util.Vector |
securityGroups
|
protected static int |
TELL_STACK_MAX_SIZE
|
protected java.util.Vector |
tellStack
|
protected java.util.Vector |
titles
|
protected java.lang.String |
tranpoofin
|
protected java.lang.String |
tranpoofout
|
protected RoomnumberSet |
visitedRoomSet
|
protected int |
wrap
|
protected java.lang.String[] |
xtraValues
|
| Fields inherited from interface com.planet_ink.coffee_mud.Common.interfaces.PlayerStats |
|---|
HYGIENE_COMMONDIRTY, HYGIENE_DELIMIT, HYGIENE_FIGHTDIRTY, HYGIENE_WATERCLEAN, REPLY_SAY, REPLY_TELL, REPLY_YELL |
| Constructor Summary | |
|---|---|
DefaultPlayerStats()
|
|
| Method Summary | |
|---|---|
void |
addAliasName(java.lang.String named)
Adds a new alias command for this player, undefined at first. |
void |
addGTellStack(java.lang.String msg)
Adds a new string message to the gtell stack. |
void |
addRoomVisit(Room R)
Records the fact that this player has been to the given room. |
void |
addTellStack(java.lang.String msg)
Adds a new string message to the tell stack. |
boolean |
adjHygiene(long byThisMuch)
Modifies, up or down, how stinky this player is. |
java.lang.String |
announceMessage()
For players with the ANNOUNCE command, this is the message used to prefix the announcements proclaimed. |
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 |
delAliasName(java.lang.String named)
Removes an old alias command for this player. |
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) |
java.lang.String |
getActiveTitle()
Returns which of the player available titles is currently being used by this player. |
java.lang.String |
getAlias(java.lang.String named)
Returns the definition of the given alias command for this player. |
java.lang.String[] |
getAliasNames()
Returns the string array set of defined alias commands for this player. |
java.lang.String |
getAliasXML()
|
int[] |
getBirthday()
Returns a 2-dimensional integer array with the players birth day and month (in mud calendar) |
int |
getChannelMask()
Returns a bitmask of channels turned on/off. |
protected int |
getCodeNum(java.lang.String code)
|
java.lang.String |
getColorStr()
Returns a custom coded string detailing the changes to the official color code that apply to this player only. |
java.lang.String |
getEmail()
Returns the players email address, if available. |
java.util.HashSet |
getFriends()
Returns a modifiable HashSet that contains the set of player Names that constitutes this players friends. |
java.util.Vector |
getGTellStack()
Returns a Vector of the last few string messages sent and received to and from this players group. |
java.util.HashSet |
getHashFrom(java.lang.String str)
|
long |
getHygiene()
Returns a long value of how stinky this player is. |
java.util.HashSet |
getIgnored()
Returns a modifiable HashSet that contains the set of player Names that constitutes this players ignored player list. |
protected java.lang.String |
getPrivateList(java.util.HashSet h)
|
java.lang.String |
getPrompt()
Returns the custom prompt, an encoded string, for this player. |
int |
getSaveStatIndex()
Returns the index into the stat codes array where extra savable fields begins. |
java.util.Vector |
getSecurityGroups()
Returns a modifiable Vector of security flags and groups strings to which this player is privileged. |
protected java.lang.String |
getSecurityGroupStr()
|
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.Vector |
getTellStack()
Returns a Vector of the last few string messages sent and received to and from this player. |
java.util.Vector |
getTitles()
Returns a Vector of modifiable title definitions. |
java.lang.String |
getTitleXML()
|
int |
getWrap()
Returns the word wrap column number for this player, or 0. |
java.lang.String |
getXML()
Returns an XML representation of all the data in this object, for persistant storage. |
boolean |
hasVisited(Area A)
Returns whether this player has visited the given area. |
boolean |
hasVisited(Room R)
Returns whether this player has visited the given room. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
int |
initializeBirthday(int ageHours,
Race R)
When a player is first created, this method is used to either initialize their birthday, or derive their birthday based on the number of hours they've played. |
void |
initializeClass()
Called ONCE after all objects are loaded, but before the map is read in during initialization. |
void |
introduceTo(java.lang.String name)
If the INTRODUCTIONSYSTEM is used, this notifys the system that this player has met the player of the given name. |
boolean |
isIntroducedTo(java.lang.String name)
If the INTRODUCTIONSYSTEM is used, this returns true if the player has been introduced to the other player of the given name. |
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. |
long |
leveledDateTime(int level)
The time, in milis since 1970, that the player gained the given level |
CMObject |
newInstance()
Returns a new instance of this class. |
java.lang.String |
notes()
Returns the administrative notes entered about this player. |
java.lang.String |
password()
Returns the players password. |
int |
percentVisited(MOB mob,
Area A)
Returns the percentage (0-100) of the given area that the given player has explored. |
java.lang.String |
poofIn()
For player with the GOTO command, this is the message seen by all when the player arrives from using GOTO. |
java.lang.String |
poofOut()
For player with the GOTO command, this is the message seen by all when the player leaves using GOTO. |
long |
replyTime()
Returns the last time, in millis since 1970, that a player last sent this playe a private message. |
MOB |
replyTo()
Returns the last MOB player who sent this player a private instant message. |
int |
replyType()
Returns the type of private message last sent to this player, an encoded constant. |
RoomnumberSet |
roomSet()
|
boolean |
sameAs(PlayerStats E)
Whether this object instance is functionally identical to the object passed in. |
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 |
setAlias(java.lang.String named,
java.lang.String value)
Modifies the commands executed by an existing alias command. |
void |
setAnnounceMessage(java.lang.String msg)
For players with the ANNOUNCE command, this sets the message used to prefix the announcements proclaimed. |
void |
setChannelMask(int newMask)
Sets the bitmask of channels turned on/off. |
void |
setColorStr(java.lang.String newColors)
Sets a custom coded string detailing the changes to the official color code that apply to this player only. |
void |
setEmail(java.lang.String newAdd)
Sets the players email address, if available. |
void |
setHygiene(long newVal)
Sets the number meaning how stinky this player is. |
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 |
setLeveledDateTime(int level,
Room R)
Notifies the player records that, at the moment this method was called, the player gained the given level. |
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 |
setPoofs(java.lang.String poofIn,
java.lang.String poofOut,
java.lang.String tranPoofIn,
java.lang.String tranPoofOut)
For players with either the GOTO or TRANSFER command, this will set the various messages seen when coming and going using either of those commands. |
void |
setPrompt(java.lang.String newPrompt)
Sets the custom prompt, an encoded string, for this player. |
void |
setReplyTo(MOB mob,
int replyType)
Sets the last MOB player who sent this player a private instant message, and some information about that tell (a defined constant). |
protected void |
setSecurityGroupStr(java.lang.String grps)
|
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 |
setWrap(int newWrap)
Sets the word wrap column number for this player, or 0. |
void |
setXML(java.lang.String str)
Restores the data in this object from an XML document. |
java.lang.String |
tranPoofIn()
For player with the TRANSFER command, this is the message seen by all when the player arrives from using TRANSFER. |
java.lang.String |
tranPoofOut()
For player with the TRANSFER command, this is the message seen by all when the player leaves using TRANSFER. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int TELL_STACK_MAX_SIZE
protected static final int GTELL_STACK_MAX_SIZE
protected long Hygiene
protected java.util.HashSet friends
protected java.util.HashSet ignored
protected java.util.Vector tellStack
protected java.util.Vector gtellStack
protected java.util.Vector titles
protected DVector alias
protected java.lang.String[] xtraValues
protected java.lang.String lastIP
protected long LastDateTime
protected long lastUpdated
protected int channelMask
protected java.lang.String email
protected java.lang.String Password
protected java.lang.String colorStr
protected java.lang.String prompt
protected java.lang.String poofin
protected java.lang.String poofout
protected java.lang.String tranpoofin
protected java.lang.String tranpoofout
protected java.lang.String announceMsg
protected java.lang.String notes
protected int wrap
protected int[] birthday
protected MOB replyTo
protected int replyType
protected long replyTime
protected java.util.Vector securityGroups
protected long accountExpiration
protected RoomnumberSet visitedRoomSet
protected DVector levelInfo
protected java.util.HashSet introductions
protected static java.lang.String[] CODES
| Constructor Detail |
|---|
public DefaultPlayerStats()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String getStat(java.lang.String code)
CMModifiable
getStat in interface CMModifiablecode - the name of the field to read.
CMModifiable.getStatCodes()
public void setStat(java.lang.String code,
java.lang.String val)
CMModifiable
setStat in interface CMModifiablecode - the name of the field to setval - the value to set the field toCMModifiable.getStatCodes()public int getSaveStatIndex()
CMModifiable
getSaveStatIndex in interface CMModifiableCMModifiable.getStatCodes(),
CMModifiable.getStat(String),
CMModifiable.setStat(String, String)public java.lang.String[] getStatCodes()
CMModifiable
getStatCodes in interface CMModifiableCMModifiable.getStat(String),
CMModifiable.setStat(String, String)public boolean isStat(java.lang.String code)
CMModifiable
isStat in interface CMModifiablecode - the name of the field to read.
CMModifiable.getStatCodes()protected int getCodeNum(java.lang.String code)
public boolean sameAs(PlayerStats E)
PlayerStats
sameAs in interface PlayerStatsE - the object to compare this one to
CMModifiable.getStatCodes(),
CMModifiable.getStat(String)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()
PlayerStats
lastIP in interface PlayerStatsPlayerStats.setLastIP(String)public void setLastIP(java.lang.String ip)
PlayerStats
setLastIP in interface PlayerStatsip - the last IP address this player logged in from.PlayerStats.lastIP()public java.lang.String getEmail()
PlayerStats
getEmail in interface PlayerStatsPlayerStats.setEmail(String)public void setEmail(java.lang.String newAdd)
PlayerStats
setEmail in interface PlayerStatsnewAdd - the players email address, if available.PlayerStats.getEmail()public long lastUpdated()
PlayerStats
lastUpdated in interface PlayerStatsPlayerStats.setLastUpdated(long)public void setLastUpdated(long time)
PlayerStats
setLastUpdated in interface PlayerStatstime - the time, in milis since 1970, that the player was last saved.PlayerStats.lastUpdated()public long lastDateTime()
PlayerStats
lastDateTime in interface PlayerStatsPlayerStats.setLastDateTime(long)public void setLastDateTime(long C)
PlayerStats
setLastDateTime in interface PlayerStatsC - the time, in milis since 1970, that the player last logged off.PlayerStats.lastDateTime()public int getWrap()
PlayerStats
getWrap in interface PlayerStatsPlayerStats.setWrap(int)public void setWrap(int newWrap)
PlayerStats
setWrap in interface PlayerStatsnewWrap - the word wrap column number for this player, or 0.PlayerStats.getWrap()public java.lang.String password()
PlayerStats
password in interface PlayerStatsPlayerStats.setPassword(String)public void setPassword(java.lang.String newPassword)
PlayerStats
setPassword in interface PlayerStatsnewPassword - the players password.PlayerStats.password()public java.lang.String notes()
PlayerStats
notes in interface PlayerStatsPlayerStats.setNotes(String)public void setNotes(java.lang.String newnotes)
PlayerStats
setNotes in interface PlayerStatsnewnotes - the administrative notes entered about this player.PlayerStats.notes()public void setChannelMask(int newMask)
PlayerStats
setChannelMask in interface PlayerStatsnewMask - the bitmask of channels turned on/off. (1=off)PlayerStats.setChannelMask(int)public int getChannelMask()
PlayerStats
getChannelMask in interface PlayerStatsPlayerStats.setChannelMask(int)public MOB replyTo()
PlayerStats
replyTo in interface PlayerStatsPlayerStats.setReplyTo(MOB, int),
PlayerStats.replyType(),
PlayerStats.replyTime()public int replyType()
PlayerStats
replyType in interface PlayerStatsPlayerStats.setReplyTo(MOB, int),
PlayerStats.replyTo(),
PlayerStats.replyTime(),
PlayerStats.REPLY_SAY,
PlayerStats.REPLY_TELL,
PlayerStats.REPLY_YELLpublic long replyTime()
PlayerStats
replyTime in interface PlayerStatsPlayerStats.setReplyTo(MOB, int),
PlayerStats.replyTo(),
PlayerStats.replyType()
public void setReplyTo(MOB mob,
int replyType)
PlayerStats
setReplyTo in interface PlayerStatsmob - the last MOB player who sent this player a private instant message.replyType - the type ofPlayerStats.replyTo(),
PlayerStats.replyType(),
PlayerStats.replyTime(),
PlayerStats.REPLY_SAY,
PlayerStats.REPLY_TELL,
PlayerStats.REPLY_YELLpublic void setPrompt(java.lang.String newPrompt)
PlayerStats
setPrompt in interface PlayerStatsnewPrompt - the custom prompt, an encoded string, or ""PlayerStats.getPrompt()public java.lang.String getColorStr()
PlayerStats
getColorStr in interface PlayerStatsPlayerStats.setColorStr(String)public void setColorStr(java.lang.String newColors)
PlayerStats
setColorStr in interface PlayerStatsnewColors - a custom coded color stringPlayerStats.getColorStr()public java.lang.String announceMessage()
PlayerStats
announceMessage in interface PlayerStatsPlayerStats.setAnnounceMessage(String)public void setAnnounceMessage(java.lang.String msg)
PlayerStats
setAnnounceMessage in interface PlayerStatsmsg - prefix to announcementsPlayerStats.announceMessage()public java.lang.String getPrompt()
PlayerStats
getPrompt in interface PlayerStatsPlayerStats.setPrompt(String)public boolean isIntroducedTo(java.lang.String name)
PlayerStats
isIntroducedTo in interface PlayerStatsname - the name of the other player
PlayerStats.introduceTo(String)public void introduceTo(java.lang.String name)
PlayerStats
introduceTo in interface PlayerStatsname - the player whom this player just met.PlayerStats.isIntroducedTo(String)public java.util.HashSet getHashFrom(java.lang.String str)
public void addTellStack(java.lang.String msg)
PlayerStats
addTellStack in interface PlayerStatsmsg - the new message for the tell stack.PlayerStats.getTellStack()public java.util.Vector getTellStack()
PlayerStats
getTellStack in interface PlayerStatsPlayerStats.addTellStack(String)public RoomnumberSet roomSet()
public void addGTellStack(java.lang.String msg)
PlayerStats
addGTellStack in interface PlayerStatsmsg - the new message for the gtell stack.PlayerStats.getGTellStack()public java.util.Vector getGTellStack()
PlayerStats
getGTellStack in interface PlayerStatsPlayerStats.addGTellStack(String)public java.util.HashSet getFriends()
PlayerStats
getFriends in interface PlayerStatspublic java.util.HashSet getIgnored()
PlayerStats
getIgnored in interface PlayerStatspublic java.lang.String[] getAliasNames()
PlayerStats
getAliasNames in interface PlayerStatsPlayerStats.getAlias(String),
PlayerStats.addAliasName(String),
PlayerStats.delAliasName(String),
PlayerStats.setAlias(String, String)public java.lang.String getAlias(java.lang.String named)
PlayerStats
getAlias in interface PlayerStatsnamed - the alias command to get the definition of
PlayerStats.getAliasNames(),
PlayerStats.addAliasName(String),
PlayerStats.delAliasName(String),
PlayerStats.setAlias(String, String)public void addAliasName(java.lang.String named)
PlayerStats
addAliasName in interface PlayerStatsnamed - the name of the alias command to addPlayerStats.getAliasNames(),
PlayerStats.getAlias(String),
PlayerStats.delAliasName(String),
PlayerStats.setAlias(String, String)public void delAliasName(java.lang.String named)
PlayerStats
delAliasName in interface PlayerStatsnamed - the name of the alias command to deletePlayerStats.getAliasNames(),
PlayerStats.getAlias(String),
PlayerStats.addAliasName(String),
PlayerStats.setAlias(String, String)
public void setAlias(java.lang.String named,
java.lang.String value)
PlayerStats
setAlias in interface PlayerStatsnamed - the alias command to modifyvalue - the new command(s) to executePlayerStats.getAliasNames(),
PlayerStats.getAlias(String),
PlayerStats.addAliasName(String),
PlayerStats.delAliasName(String)public java.lang.String getAliasXML()
public java.lang.String getActiveTitle()
PlayerStats
getActiveTitle in interface PlayerStatsPlayerStats.getTitles()public java.util.Vector getTitles()
PlayerStats