com.planet_ink.coffee_mud.Common
Class DefaultPlayerStats

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.DefaultPlayerStats
All Implemented Interfaces:
AccountStats, CMCommon, PlayerStats, CMObject, Contingent, Modifiable, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class DefaultPlayerStats
extends java.lang.Object
implements PlayerStats


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.AccountStats
AccountStats.Agent, AccountStats.PrideStat
 
Field Summary
protected  java.util.Map<java.lang.String,AbilityMapper.AbilityMapping> ableMap
           
protected  PlayerAccount account
           
protected  long accountExpires
           
protected  java.util.Map<java.lang.String,AchievementLibrary.Tracker> achievementers
           
protected  java.util.Map<java.lang.String,java.lang.String> alias
           
protected  java.lang.String announceMsg
           
protected  java.util.Set<java.lang.String> autoInvokeSet
           
protected  int[] birthday
           
protected  int bonusCharStatPt
           
protected  int bonusCommonSk
           
protected  int bonusCraftSk
           
protected  int bonusLanguages
           
protected  int bonusNonCraftSk
           
protected  int channelMask
           
protected  java.util.Map<CharClass,java.util.Map<java.lang.String,java.lang.Object>> classMap
           
protected static java.lang.String[] CODES
           
protected  java.lang.String colorStr
           
protected  java.util.Map<java.lang.String,int[]> combatSpams
           
protected  java.lang.String deathPoof
           
protected  int deferredXP
           
protected  java.lang.String email
           
protected  java.util.Map<java.lang.String,ExpertiseLibrary.ExpertiseDefinition> experMap
           
protected  ItemCollection extItems
           
protected  java.util.Set<java.lang.String> friends
           
protected static int GTELL_STACK_MAX_SIZE
           
protected  java.util.List<java.lang.String> gtellStack
           
protected  long hygiene
           
protected  java.util.Set<java.lang.String> ignored
           
protected  java.util.Set<java.lang.String> introductions
           
protected  boolean isSavable
           
protected  java.lang.String lastIP
           
protected  long lastRolePlayTm
           
protected  long lastUpdated
           
protected  long lastXPDateTime
           
protected  java.util.Map<java.lang.String,java.lang.Integer> legacy
           
protected  QuadVector<java.lang.Integer,java.lang.Long,java.lang.String,java.lang.Long> levelInfo
           
protected  long lLastDateTime
           
protected  int maxDeferredXP
           
protected  int maxRolePlayXP
           
protected  java.lang.String notes
           
protected  int pageBreak
           
protected  java.lang.String password
           
protected  java.lang.String poofin
           
protected  java.lang.String poofout
           
protected  long[] prideExpireTime
           
protected  int[][] prideStats
           
protected  java.lang.String prompt
           
protected  long replyTime
           
protected  MOB replyTo
           
protected  int replyType
           
protected  int rolePlayXP
           
protected  java.lang.String savedPose
           
protected  CMSecurity.SecGroup securityFlags
           
protected static int TELL_STACK_MAX_SIZE
           
protected  java.util.List<java.lang.String> tellStack
           
protected  int theme
           
protected  java.util.List<java.lang.String> 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
BIRTHDEX_DAY, BIRTHDEX_LASTYEARCELEBRATED, BIRTHDEX_MONTH, BIRTHDEX_YEAR, HYGIENE_COMMONDIRTY, HYGIENE_DELIMIT, HYGIENE_FIGHTDIRTY, HYGIENE_RAINCLEAN, 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 addAutoInvokeList(java.lang.String abilityID)
          Adds the given ability ID is on the list of those skills whose autoInvocation should be suppressed.
 void addGTellStack(java.lang.String msg)
          Adds a new string message to the gtell stack.
 void addLegacyLevel(java.lang.String category)
          Adds a new legacy level in the given category.
 boolean 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.
 boolean amDestroyed()
          Whether the destroy() method has been previousy called on this object.
 void bumpPrideStat(AccountStats.PrideStat stat, int amt)
          Add to one of the pride stats for this player or 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 delAliasName(java.lang.String named)
          Removes an old alias command for this player.
 void destroy()
          Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java.
 PlayerAccount getAccount()
          If the ACCOUNTSYSTEM is used, this will access the account object that is shared by all players of 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)
 AchievementLibrary.Tracker getAchievementTracker(AchievementLibrary.Achievement A, MOB mob)
          Returns the tracker for the given achievement, for the given mob, or creates it if it does not exist.
 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()
           
 java.lang.String getAnnounceMessage()
          For players with the ANNOUNCE command, this is the message used to prefix the announcements proclaimed.
 int[] getBirthday()
          Returns a 2-dimensional integer array with the players birth day and month (in mud calendar)
 int getBonusCharStatPoints()
          Returns the number of bonus char stat points to assign to stats during character creation.
 int getBonusCommonSkillLimits()
          Returns the number of bonus common skills available to this character.
 int getBonusCraftingSkillLimits()
          Returns the number of bonus Crafting skills available to this character.
 int getBonusLanguageLimits()
          Returns the number of bonus Language skills available to this character.
 int getBonusNonCraftingSkillLimits()
          Returns the number of bonus Gathering skills available to this character.
 int getChannelMask()
          Returns a bitmask of channels turned on/off.
 java.util.Map<java.lang.String,java.lang.Object> getClassVariableMap(CharClass charClass)
          Returns a personal miscellaneous object map, to be used for non-core-system attributes, such as transient class variables.
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.util.Map<java.lang.String,int[]> getCombatSpams()
          If the player has NoCombatSpam turned on, then these player settings are used to hold accumulated information about combat results for summarizing later.
 java.lang.String getDeathPoof()
          This is the message seen by all when the player dies.
 int getDeferredXP()
          Returns the current amount of deferred xp that this player has been awarded, typically over a given level.
 java.lang.String getEmail()
          Returns the players email address, if available.
 ItemCollection getExtItems()
          Gets external items belonging to this player, which should be destroyed with the player, but can still be transient.
 java.util.Map<java.lang.String,ExpertiseLibrary.ExpertiseDefinition> getExtraQualifiedExpertises()
          Returns a mapping definition between awarded expertise and their requirements.
 java.util.Map<java.lang.String,AbilityMapper.AbilityMapping> getExtraQualifiedSkills()
          Returns a mapping definition between awarded abilities and their requirements.
 java.util.Set<java.lang.String> getFriends()
          Returns a modifiable Set that contains the set of player Names that constitutes this players friends.
 java.util.List<java.lang.String> getGTellStack()
          Returns a List of the last few string messages sent and received to and from this players group.
 SHashSet<java.lang.String> getHashFrom(java.lang.String str)
           
 long getHygiene()
          Returns a long value of how stinky this player is.
 java.util.Set<java.lang.String> getIgnored()
          Returns a modifiable Set that contains the set of player Names that constitutes this players ignored player list.
 long getLastDateTime()
          The time, in milis since 1970, that the player last logged off.
 java.lang.String getLastIP()
          The last IP address this player logged in from.
 long getLastRolePlayXPTime()
          Returns the last time roleplay xp was earned in a way that could be spammed.
 long getLastUpdated()
          The time, in milis since 1970, that the player was last saved.
 long getLastXPAwardMillis()
          Returns the last time this player has been awarded XP.
 int getLegacyLevel(java.lang.String category)
          Returns the legacy levels for this player, in the given categories
 java.lang.String getLegacyXML()
           
 int getMaxDeferredXP()
          Returns the maximum amount of deferred xp that this player can be awarded, typically over a given level.
 int getMaxRolePlayXP()
          Returns the maximum amount of role playing xp that this player can be awarded, typically over a given level.
 java.lang.String getNotes()
          Returns the administrative notes entered about this player.
 int getPageBreak()
          Returns the page break row for this player, or 0.
 java.lang.String getPasswordStr()
          Returns the players password, perhaps encoded, perhaps plain text.
 java.lang.String getPoofIn()
          For player with the GOTO command, this is the message seen by all when the player arrives from using GOTO.
 java.lang.String getPoofOut()
          For player with the GOTO command, this is the message seen by all when the player leaves using GOTO.
 int getPrideStat(TimeClock.TimePeriod period, AccountStats.PrideStat stat)
          Get one of the pride stats for this player or account
protected  java.lang.String getPrivateList(java.util.Set<java.lang.String> h)
           
 java.lang.String getPrompt()
          Returns the custom prompt, an encoded string, for this player.
 MOB getReplyToMOB()
          Returns the last MOB player who sent this player a private instant message.
 long getReplyToTime()
          Returns the last time, in millis since 1970, that a player last sent this playe a private message.
 int getReplyType()
          Returns the type of private message last sent to this player, an encoded constant.
 int getRolePlayXP()
          Returns the current amount of role playing xp that this player has been awarded, typically over a given level.
 java.lang.String getSavedPose()
          Gets the saved pose string for players.
 int getSaveStatIndex()
          Returns the index into the stat codes array where extra savable fields begins.
 CMSecurity.SecGroup getSecurityFlags()
          Returns a read-only Set of security flags that apply to this player.
 java.lang.String getSetSecurityFlags(java.lang.String newFlags)
          Returns and/or sets the security flags and groups strings to which this player is privileged.
 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.List<java.lang.String> getTellStack()
          Returns a List of the last few string messages sent and received to and from this player.
 int getTheme()
          Returns the theme used to create this player.
 java.util.List<java.lang.String> getTitles()
          Returns a list of modifiable title definitions.
 int getTotalLegacyLevels()
          Returns the total legacy levels for this player, all categories
 java.lang.String getTranPoofIn()
          For player with the TRANSFER command, this is the message seen by all when the player arrives from using TRANSFER.
 java.lang.String getTranPoofOut()
          For player with the TRANSFER command, this is the message seen by all when the player leaves using TRANSFER.
 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 persistent 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(TimeClock clock, 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 isIgnored(MOB mob)
          Returns whether the given player is being ignored.
 boolean isIgnored(java.lang.String name)
          Returns whether the given player name is being ignored.
 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 isOnAutoInvokeList(java.lang.String abilityID)
          Checks whether the given ability ID is on the list of those skills whose autoInvocation should be suppressed.
 boolean isSavable()
          Whether, if this object is in a room, whether it is appropriate to save this object to the database as a permanent feature of its container.
 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.
 void killAchievementTracker(AchievementLibrary.Achievement A, MOB mob)
          Deletes the tracker for the given achievement, for the given mob.
 long leveledDateTime(int level)
          The time, in milis since 1970, that the player gained the given level
 long leveledMinutesPlayed(int level)
          The number of minutes played when the player gained the given level
 java.lang.String leveledRoomID(int level)
          The roomID that the player gained the given level
 boolean matchesPassword(java.lang.String checkPass)
          Returns the players password, perhaps encoded, perhaps plain text.
 java.lang.String name()
          The displayable name of this object.
 CMObject newInstance()
          Returns a new instance of this class.
 int percentVisited(MOB mob, Area A)
          Returns the percentage (0-100) of the given area that the given player has explored.
 void rebuildAchievementTracker(MOB mob, java.lang.String achievementTattoo)
          If an Achievement is modified or removed, this method will update the internal player tracker for that achievement.
 void removeAutoInvokeList(java.lang.String abilityID)
          Removes the given ability ID is on the list of those skills whose autoInvocation should be suppressed.
 boolean sameAs(PlayerStats E)
          Whether this object instance is functionally identical to the object passed in.
 void setAccount(PlayerAccount account)
          If the ACCOUNTSYSTEM is used, this will allow you to set the account object that is shared by all players of this account.
 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 setBonusCharStatPoints(int bonus)
          Sets the number of bonus char stat points to assign to stats during character creation.
 void setBonusCommonSkillLimits(int bonus)
          Sets the number of bonus common skills available to this character.
 void setBonusCraftingSkillLimits(int bonus)
          Sets the number of bonus Crafting skills available to this character.
 void setBonusLanguageLimits(int bonus)
          Sets the number of bonus Language skills available to this character.
 void setBonusNonCraftingSkillLimits(int bonus)
          Sets the number of bonus Gathering skills available to this character.
 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 setDeathPoof(java.lang.String poof)
          This is the message seen by all when the player dies.
 void setDeferredXP(int amt)
          Sets the amount of deferred xp that this player has been awarded, typically over a given level.
 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 setLastRolePlayXPTime(long tm)
          Sets the last time roleplay xp was earned in a way that could be spammed.
 void setLastUpdated(long time)
          Sets the time, in milis since 1970, that the player was last saved.
 void setLastXPAwardMillis(long time)
          Sets the last time this player has been awarded XP.
 void setLeveledDateTime(int level, long ageHours, Room R)
          Notifies the player records that, at the moment this method was called, the player gained the given level.
 void setMaxDeferredXP(int amt)
          Sets the maximum amount of deferred xp that this player can be awarded, typically over a given level.
 void setMaxRolePlayXP(int amt)
          Sets the maximum amount of role playing xp that this player can be awarded, typically over a given level.
 void setNotes(java.lang.String newnotes)
          Sets the administrative notes entered about this player.
 void setPageBreak(int newBreak)
          Sets the page break row for this player, or 0.
 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).
 void setRolePlayXP(int amt)
          Sets the amount of role playing xp that this player has been awarded, typically over a given level.
 void setSavable(boolean truefalse)
          Sets whether this object can be saved as a permanent aspect of its host.
 void setSavedPose(java.lang.String msg)
          Sets the saved pose string for players.
 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 setTheme(int theme)
          Sets the theme used to create this player.
 void setWrap(int newWrap)
          Sets the word wrap column number for this player, or 0.
 void setXML(java.lang.String xmlStr)
          Restores the data in this object from an XML document.
 void unVisit(Area A)
          Deletes the visitation record for all rooms in the given area.
 void unVisit(Room R)
          Deletes the visitation record for the given room
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TELL_STACK_MAX_SIZE

protected static final int TELL_STACK_MAX_SIZE
See Also:
Constant Field Values

GTELL_STACK_MAX_SIZE

protected static final int GTELL_STACK_MAX_SIZE
See Also:
Constant Field Values

hygiene

protected long hygiene

theme

protected int theme

xtraValues

protected java.lang.String[] xtraValues

lastIP

protected java.lang.String lastIP

lLastDateTime

protected long lLastDateTime

lastXPDateTime

protected long lastXPDateTime

lastUpdated

protected long lastUpdated

rolePlayXP

protected int rolePlayXP

maxRolePlayXP

protected int maxRolePlayXP

lastRolePlayTm

protected long lastRolePlayTm

deferredXP

protected int deferredXP

maxDeferredXP

protected int maxDeferredXP

channelMask

protected int channelMask

email

protected java.lang.String email

password

protected java.lang.String password

colorStr

protected java.lang.String colorStr

prompt

protected java.lang.String prompt

poofin

protected java.lang.String poofin

poofout

protected java.lang.String poofout

tranpoofin

protected java.lang.String tranpoofin

tranpoofout

protected java.lang.String tranpoofout

deathPoof

protected java.lang.String deathPoof

announceMsg

protected java.lang.String announceMsg

savedPose

protected java.lang.String savedPose

notes

protected java.lang.String notes

wrap

protected int wrap

bonusCommonSk

protected int bonusCommonSk

bonusCraftSk

protected int bonusCraftSk

bonusNonCraftSk

protected int bonusNonCraftSk

bonusLanguages

protected int bonusLanguages

bonusCharStatPt

protected int bonusCharStatPt

pageBreak

protected int pageBreak

birthday

protected int[] birthday

replyTo

protected MOB replyTo

replyType

protected int replyType

replyTime

protected long replyTime

friends

protected java.util.Set<java.lang.String> friends

ignored

protected java.util.Set<java.lang.String> ignored

tellStack

protected java.util.List<java.lang.String> tellStack

gtellStack

protected java.util.List<java.lang.String> gtellStack

titles

protected java.util.List<java.lang.String> titles

autoInvokeSet

protected java.util.Set<java.lang.String> autoInvokeSet

account

protected PlayerAccount account

securityFlags

protected CMSecurity.SecGroup securityFlags

accountExpires

protected long accountExpires

visitedRoomSet

protected RoomnumberSet visitedRoomSet

introductions

protected java.util.Set<java.lang.String> introductions

prideExpireTime

protected long[] prideExpireTime

prideStats

protected int[][] prideStats

extItems

protected ItemCollection extItems

isSavable

protected volatile boolean isSavable

achievementers

protected java.util.Map<java.lang.String,AchievementLibrary.Tracker> achievementers

alias

protected java.util.Map<java.lang.String,java.lang.String> alias

legacy

protected java.util.Map<java.lang.String,java.lang.Integer> legacy

combatSpams

protected java.util.Map<java.lang.String,int[]> combatSpams

ableMap

protected java.util.Map<java.lang.String,AbilityMapper.AbilityMapping> ableMap

experMap

protected java.util.Map<java.lang.String,ExpertiseLibrary.ExpertiseDefinition> experMap

classMap

protected java.util.Map<CharClass,java.util.Map<java.lang.String,java.lang.Object>> classMap

levelInfo

protected QuadVector<java.lang.Integer,java.lang.Long,java.lang.String,java.lang.Long> levelInfo

CODES

protected static java.lang.String[] CODES
Constructor Detail

DefaultPlayerStats

public DefaultPlayerStats()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, Tech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Returns:
the name of this class

name

public java.lang.String name()
Description copied from interface: CMObject
The displayable name of this object. May be modified by phyStats() object. Is derived from the Name().

Specified by:
name in interface CMObject
Returns:
the modified final name of this object on the map.
See Also:
Environmental.Name()

newInstance

public CMObject newInstance()
Description copied from interface: CMObject
Returns a new instance of this class.

Specified by:
newInstance in interface CMObject
Returns:
a new instance of this class

initializeClass

public void initializeClass()
Description copied from interface: CMObject
Called ONCE after all objects are loaded, but before the map is read in during initialization.

Specified by:
initializeClass in interface CMObject

copyOf

public CMObject copyOf()
Description copied from interface: CMObject
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.

Specified by:
copyOf in interface CMObject
Returns:
a clone of this object

getLastIP

public java.lang.String getLastIP()
Description copied from interface: AccountStats
The last IP address this player logged in from.

Specified by:
getLastIP in interface AccountStats
Returns:
the last IP address this player logged in from.
See Also:
AccountStats.setLastIP(String)

setLastIP

public void setLastIP(java.lang.String ip)
Description copied from interface: AccountStats
Sets the last IP address this player logged in from.

Specified by:
setLastIP in interface AccountStats
Parameters:
ip - the last IP address this player logged in from.
See Also:
AccountStats.getLastIP()

getEmail

public java.lang.String getEmail()
Description copied from interface: AccountStats
Returns the players email address, if available.

Specified by:
getEmail in interface AccountStats
Returns:
the players email address, if available.
See Also:
AccountStats.setEmail(String)

setEmail

public void setEmail(java.lang.String newAdd)
Description copied from interface: AccountStats
Sets the players email address, if available.

Specified by:
setEmail in interface AccountStats
Parameters:
newAdd - the players email address, if available.
See Also:
AccountStats.getEmail()

getTheme

public int getTheme()
Description copied from interface: PlayerStats
Returns the theme used to create this player.

Specified by:
getTheme in interface PlayerStats
Returns:
the theme used to create this player.
See Also:
Area.THEME_BIT_NAMES, PlayerStats.setTheme(int)

setTheme

public void setTheme(int theme)
Description copied from interface: PlayerStats
Sets the theme used to create this player.

Specified by:
setTheme in interface PlayerStats
Parameters:
theme - the theme used to create this player.
See Also:
Area.THEME_BIT_NAMES, PlayerStats.getTheme()

getLastUpdated

public long getLastUpdated()
Description copied from interface: PlayerStats
The time, in milis since 1970, that the player was last saved.

Specified by:
getLastUpdated in interface AccountStats
Specified by:
getLastUpdated in interface PlayerStats
Returns:
the time, in milis since 1970, that the player was last saved.
See Also:
PlayerStats.setLastUpdated(long)

setLastUpdated

public void setLastUpdated(long time)
Description copied from interface: PlayerStats
Sets the time, in milis since 1970, that the player was last saved.

Specified by:
setLastUpdated in interface AccountStats
Specified by:
setLastUpdated in interface PlayerStats
Parameters:
time - the time, in milis since 1970, that the player was last saved.
See Also:
PlayerStats.getLastUpdated()

getLastDateTime

public long getLastDateTime()
Description copied from interface: AccountStats
The time, in milis since 1970, that the player last logged off.

Specified by:
getLastDateTime in interface AccountStats
Returns:
time, in milis since 1970, that the player last logged off.
See Also:
AccountStats.setLastDateTime(long)

setLastDateTime

public void setLastDateTime(long C)
Description copied from interface: AccountStats
Sets the time, in milis since 1970, that the player last logged off.

Specified by:
setLastDateTime in interface AccountStats
Parameters:
C - the time, in milis since 1970, that the player last logged off.
See Also:
AccountStats.getLastDateTime()

getPasswordStr

public java.lang.String getPasswordStr()
Description copied from interface: AccountStats
Returns the players password, perhaps encoded, perhaps plain text. Use matchesPassword(String) to do actual checks.

Specified by:
getPasswordStr in interface AccountStats
Returns:
the players password.
See Also:
AccountStats.setPassword(String), AccountStats.matchesPassword(String)

setPassword

public void setPassword(java.lang.String newPassword)
Description copied from interface: AccountStats
Sets the players password.

Specified by:
setPassword in interface AccountStats
Parameters:
newPassword - the players password.
See Also:
AccountStats.getPasswordStr(), AccountStats.matchesPassword(String)

matchesPassword

public boolean matchesPassword(java.lang.String checkPass)
Description copied from interface: AccountStats
Returns the players password, perhaps encoded, perhaps plain text. Use matchesPassword(String) to do actual checks.

Specified by:
matchesPassword in interface AccountStats
Parameters:
checkPass - the password to compare reality to
Returns:
the players password.
See Also:
AccountStats.setPassword(String), AccountStats.getPasswordStr()

getWrap

public int getWrap()
Description copied from interface: PlayerStats
Returns the word wrap column number for this player, or 0.

Specified by:
getWrap in interface PlayerStats
Returns:
the word wrap column number for this player, or 0.
See Also:
PlayerStats.setWrap(int)

setWrap

public void setWrap(int newWrap)
Description copied from interface: PlayerStats
Sets the word wrap column number for this player, or 0.

Specified by:
setWrap in interface PlayerStats
Parameters:
newWrap - the word wrap column number for this player, or 0.
See Also:
PlayerStats.getWrap()

getPageBreak

public int getPageBreak()
Description copied from interface: PlayerStats
Returns the page break row for this player, or 0.

Specified by:
getPageBreak in interface PlayerStats
Returns:
the page break row for this player, or 0.
See Also:
PlayerStats.setPageBreak(int)

setPageBreak

public void setPageBreak(int newBreak)
Description copied from interface: PlayerStats
Sets the page break row for this player, or 0.

Specified by:
setPageBreak in interface PlayerStats
Parameters:
newBreak - the page break row for this player, or 0.
See Also:
PlayerStats.getPageBreak()

getNotes

public java.lang.String getNotes()
Description copied from interface: AccountStats
Returns the administrative notes entered about this player.

Specified by:
getNotes in interface AccountStats
Returns:
the administrative notes entered about this player.
See Also:
AccountStats.setNotes(String)

setNotes

public void setNotes(java.lang.String newnotes)
Description copied from interface: AccountStats
Sets the administrative notes entered about this player.

Specified by:
setNotes in interface AccountStats
Parameters:
newnotes - the administrative notes entered about this player.
See Also:
AccountStats.getNotes()

setChannelMask

public void setChannelMask(int newMask)
Description copied from interface: PlayerStats
Sets the bitmask of channels turned on/off. (32 channels supported)

Specified by:
setChannelMask in interface PlayerStats
Parameters:
newMask - the bitmask of channels turned on/off. (1=off)
See Also:
PlayerStats.setChannelMask(int)

getChannelMask

public int getChannelMask()
Description copied from interface: PlayerStats
Returns a bitmask of channels turned on/off. (32 channels supported)

Specified by:
getChannelMask in interface PlayerStats
Returns:
a bitmask of channels turned on/off. (1=off)
See Also:
PlayerStats.setChannelMask(int)

getReplyToMOB

public MOB getReplyToMOB()
Description copied from interface: PlayerStats
Returns the last MOB player who sent this player a private instant message.

Specified by:
getReplyToMOB in interface PlayerStats
Returns:
the last MOB player who sent this player a private instant message.
See Also:
PlayerStats.setReplyTo(MOB, int), PlayerStats.getReplyType(), PlayerStats.getReplyToTime()

getReplyType

public int getReplyType()
Description copied from interface: PlayerStats
Returns the type of private message last sent to this player, an encoded constant.

Specified by:
getReplyType in interface PlayerStats
Returns:
the type of private message last sent to this player
See Also:
PlayerStats.setReplyTo(MOB, int), PlayerStats.getReplyToMOB(), PlayerStats.getReplyToTime(), PlayerStats.REPLY_SAY, PlayerStats.REPLY_TELL, PlayerStats.REPLY_YELL

getReplyToTime

public long getReplyToTime()
Description copied from interface: PlayerStats
Returns the last time, in millis since 1970, that a player last sent this playe a private message.

Specified by:
getReplyToTime in interface PlayerStats
Returns:
the last time this player got a private message
See Also:
PlayerStats.setReplyTo(MOB, int), PlayerStats.getReplyToMOB(), PlayerStats.getReplyType()

setReplyTo

public void setReplyTo(MOB mob,
                       int replyType)
Description copied from interface: PlayerStats
Sets the last MOB player who sent this player a private instant message, and some information about that tell (a defined constant).

Specified by:
setReplyTo in interface PlayerStats
Parameters:
mob - the last MOB player who sent this player a private instant message.
replyType - the type of
See Also:
PlayerStats.getReplyToMOB(), PlayerStats.getReplyType(), PlayerStats.getReplyToTime(), PlayerStats.REPLY_SAY, PlayerStats.REPLY_TELL, PlayerStats.REPLY_YELL

setPrompt

public void setPrompt(java.lang.String newPrompt)
Description copied from interface: PlayerStats
Sets the custom prompt, an encoded string, for this player. "" means default is used.

Specified by:
setPrompt in interface PlayerStats
Parameters:
newPrompt - the custom prompt, an encoded string, or ""
See Also:
PlayerStats.getPrompt()

getColorStr

public java.lang.String getColorStr()
Description copied from interface: PlayerStats
Returns a custom coded string detailing the changes to the official color code that apply to this player only. The format is the Color Code Letter (the one after the ^ character) followed by the ansi color from the basic set, followed by a # character, repeated.

Specified by:
getColorStr in interface PlayerStats
Returns:
a custom coded color string
See Also:
PlayerStats.setColorStr(String)

setColorStr

public void setColorStr(java.lang.String newColors)
Description copied from interface: PlayerStats
Sets a custom coded string detailing the changes to the official color code that apply to this player only. The format is the Color Code Letter (the one after the ^ character) followed by the ansi color from the basic set, followed by a # character, repeated.

Specified by:
setColorStr in interface PlayerStats
Parameters:
newColors - a custom coded color string
See Also:
PlayerStats.getColorStr()

getAnnounceMessage

public java.lang.String getAnnounceMessage()
Description copied from interface: PlayerStats
For players with the ANNOUNCE command, this is the message used to prefix the announcements proclaimed.

Specified by:
getAnnounceMessage in interface PlayerStats
Returns:
prefix to announcements
See Also:
PlayerStats.setAnnounceMessage(String)

setAnnounceMessage

public void setAnnounceMessage(java.lang.String msg)
Description copied from interface: PlayerStats
For players with the ANNOUNCE command, this sets the message used to prefix the announcements proclaimed.

Specified by:
setAnnounceMessage in interface PlayerStats
Parameters:
msg - prefix to announcements
See Also:
PlayerStats.getAnnounceMessage()

getSavedPose

public java.lang.String getSavedPose()
Description copied from interface: PlayerStats
Gets the saved pose string for players.

Specified by:
getSavedPose in interface PlayerStats
Returns:
a saved pose string
See Also:
PlayerStats.setSavedPose(String)

setSavedPose

public void setSavedPose(java.lang.String msg)
Description copied from interface: PlayerStats
Sets the saved pose string for players.

Specified by:
setSavedPose in interface PlayerStats
Parameters:
msg - a saved pose string
See Also:
PlayerStats.getSavedPose()

getPrompt

public java.lang.String getPrompt()
Description copied from interface: PlayerStats
Returns the custom prompt, an encoded string, for this player. "" means default is used.

Specified by:
getPrompt in interface PlayerStats
Returns:
the custom prompt, an encoded string, or ""
See Also:
PlayerStats.setPrompt(String)

isIntroducedTo

public boolean isIntroducedTo(java.lang.String name)
Description copied from interface: PlayerStats
If the INTRODUCTIONSYSTEM is used, this returns true if the player has been introduced to the other player of the given name.

Specified by:
isIntroducedTo in interface PlayerStats
Parameters:
name - the name of the other player
Returns:
true if this player has met that one, false otherwise
See Also:
PlayerStats.introduceTo(String)

introduceTo

public void introduceTo(java.lang.String name)
Description copied from interface: PlayerStats
If the INTRODUCTIONSYSTEM is used, this notifys the system that this player has met the player of the given name.

Specified by:
introduceTo in interface PlayerStats
Parameters:
name - the player whom this player just met.
See Also:
PlayerStats.isIntroducedTo(String)

getHashFrom

public SHashSet<java.lang.String> getHashFrom(java.lang.String str)

addTellStack

public void addTellStack(java.lang.String msg)
Description copied from interface: PlayerStats
Adds a new string message to the tell stack.

Specified by:
addTellStack in interface PlayerStats
Parameters:
msg - the new message for the tell stack.
See Also:
PlayerStats.getTellStack()

getTellStack

public java.util.List<java.lang.String> getTellStack()
Description copied from interface: PlayerStats
Returns a List of the last few string messages sent and received to and from this player.

Specified by:
getTellStack in interface PlayerStats
Returns:
a List of strings, the last few tell messages
See Also:
PlayerStats.addTellStack(String)

addGTellStack

public void addGTellStack(java.lang.String msg)
Description copied from interface: PlayerStats
Adds a new string message to the gtell stack.

Specified by:
addGTellStack in interface PlayerStats
Parameters:
msg - the new message for the gtell stack.
See Also:
PlayerStats.getGTellStack()

getGTellStack

public java.util.List<java.lang.String> getGTellStack()
Description copied from interface: PlayerStats
Returns a List of the last few string messages sent and received to and from this players group.

Specified by:
getGTellStack in interface PlayerStats
Returns:
a List of strings, the last few gtell messages
See Also:
PlayerStats.addGTellStack(String)

getFriends

public java.util.Set<java.lang.String> getFriends()
Description copied from interface: AccountStats
Returns a modifiable Set that contains the set of player Names that constitutes this players friends.

Specified by:
getFriends in interface AccountStats
Returns:
a set of player friend names

getIgnored

public java.util.Set<java.lang.String> getIgnored()
Description copied from interface: AccountStats
Returns a modifiable Set that contains the set of player Names that constitutes this players ignored player list.

Specified by:
getIgnored in interface AccountStats
Returns:
a set of player ignored player list Names
See Also:
AccountStats.isIgnored(String), AccountStats.isIgnored(MOB)

isIgnored

public boolean isIgnored(MOB mob)
Description copied from interface: AccountStats
Returns whether the given player is being ignored.

Specified by:
isIgnored in interface AccountStats
Parameters:
mob - the mob to check
Returns:
true if the given mob is ignored
See Also:
AccountStats.getIgnored(), AccountStats.isIgnored(String)

isIgnored

public boolean isIgnored(java.lang.String name)
Description copied from interface: AccountStats
Returns whether the given player name is being ignored.

Specified by:
isIgnored in interface AccountStats
Parameters:
name - the name to check
Returns:
true if the given name is ignored
See Also:
AccountStats.getIgnored(), AccountStats.isIgnored(MOB)

getClassVariableMap

public java.util.Map<java.lang.String,java.lang.Object> getClassVariableMap(CharClass charClass)
Description copied from interface: PlayerStats
Returns a personal miscellaneous object map, to be used for non-core-system attributes, such as transient class variables.

Specified by:
getClassVariableMap in interface PlayerStats
Parameters:
charClass - the Character Class for the variables
Returns:
a personal miscellaneous object map

getAliasNames

public java.lang.String[] getAliasNames()
Description copied from interface: PlayerStats
Returns the string array set of defined alias commands for this player.

Specified by:
getAliasNames in interface PlayerStats
Returns:
the string array set of defined alias commands.
See Also:
PlayerStats.getAlias(String), PlayerStats.addAliasName(String), PlayerStats.delAliasName(String), PlayerStats.setAlias(String, String)

getAlias

public java.lang.String getAlias(java.lang.String named)
Description copied from interface: PlayerStats
Returns the definition of the given alias command for this player.

Specified by:
getAlias in interface PlayerStats
Parameters:
named - the alias command to get the definition of
Returns:
the command(s) to execute when the command is entered.
See Also:
PlayerStats.getAliasNames(), PlayerStats.addAliasName(String), PlayerStats.delAliasName(String), PlayerStats.setAlias(String, String)

addAliasName

public void addAliasName(java.lang.String named)
Description copied from interface: PlayerStats
Adds a new alias command for this player, undefined at first.

Specified by:
addAliasName in interface PlayerStats
Parameters:
named - the name of the alias command to add
See Also:
PlayerStats.getAliasNames(), PlayerStats.getAlias(String), PlayerStats.delAliasName(String), PlayerStats.setAlias(String, String)

delAliasName

public void delAliasName(java.lang.String named)
Description copied from interface: PlayerStats
Removes an old alias command for this player.

Specified by:
delAliasName in interface PlayerStats
Parameters:
named - the name of the alias command to delete
See Also:
PlayerStats.getAliasNames(), PlayerStats.getAlias(String), PlayerStats.addAliasName(String), PlayerStats.setAlias(String, String)

setAlias

public void setAlias(java.lang.String named,
                     java.lang.String value)
Description copied from interface: PlayerStats
Modifies the commands executed by an existing alias command.

Specified by:
setAlias in interface PlayerStats
Parameters:
named - the alias command to modify
value - the new command(s) to execute
See Also:
PlayerStats.getAliasNames(), PlayerStats.getAlias(String), PlayerStats.addAliasName(String), PlayerStats.delAliasName(String)

getAliasXML

public java.lang.String getAliasXML()

getLegacyXML

public java.lang.String getLegacyXML()

getActiveTitle

public java.lang.String getActiveTitle()
Description copied from interface: PlayerStats
Returns which of the player available titles is currently being used by this player. Its a string like *, the bunny slayer

Specified by:
getActiveTitle in interface PlayerStats
Returns:
a title being used by this player
See Also:
PlayerStats.getTitles()

getTitles

public java.util.List<java.lang.String> getTitles()
Description copied from interface: PlayerStats
Returns a list of modifiable title definitions. These are things like *, the bunny slayer and such.

Specified by:
getTitles in interface PlayerStats
Returns:
a list of modifiable title definitions
See Also:
PlayerStats.getActiveTitle()

getDeathPoof

public java.lang.String getDeathPoof()
Description copied from interface: PlayerStats
This is the message seen by all when the player dies.

Specified by:
getDeathPoof in interface PlayerStats
Returns:
the death poof-message
See Also:
PlayerStats.setDeathPoof(String)

setDeathPoof

public void setDeathPoof(java.lang.String poof)
Description copied from interface: PlayerStats
This is the message seen by all when the player dies.

Specified by:
setDeathPoof in interface PlayerStats
Parameters:
poof - the death poof-message
See Also:
PlayerStats.getDeathPoof()

getPoofIn

public java.lang.String getPoofIn()
Description copied from interface: PlayerStats
For player with the GOTO command, this is the message seen by all when the player arrives from using GOTO.

Specified by:
getPoofIn in interface PlayerStats
Returns:
the poof-in GOTO message
See Also:
PlayerStats.getPoofOut(), PlayerStats.setPoofs(String, String, String, String)

getPoofOut

public java.lang.String getPoofOut()
Description copied from interface: PlayerStats
For player with the GOTO command, this is the message seen by all when the player leaves using GOTO.

Specified by:
getPoofOut in interface PlayerStats
Returns:
the poof-out GOTO message
See Also:
PlayerStats.getPoofIn(), PlayerStats.setPoofs(String, String, String, String)

getTranPoofIn

public java.lang.String getTranPoofIn()
Description copied from interface: PlayerStats
For player with the TRANSFER command, this is the message seen by all when the player arrives from using TRANSFER.

Specified by:
getTranPoofIn in interface PlayerStats
Returns:
the poof-in TRANSFER message
See Also:
PlayerStats.getTranPoofOut(), PlayerStats.setPoofs(String, String, String, String)

getTranPoofOut

public java.lang.String getTranPoofOut()
Description copied from interface: PlayerStats
For player with the TRANSFER command, this is the message seen by all when the player leaves using TRANSFER.

Specified by:
getTranPoofOut in interface PlayerStats
Returns:
the poof-out TRANSFER message
See Also:
PlayerStats.getTranPoofIn(), PlayerStats.setPoofs(String, String, String, String)

getBirthday

public int[] getBirthday()
Description copied from interface: PlayerStats
Returns a 2-dimensional integer array with the players birth day and month (in mud calendar)

Specified by:
getBirthday in interface PlayerStats
Returns:
a 2-dimensional integer array (day/month)
See Also:
PlayerStats.initializeBirthday(TimeClock, int, Race)

initializeBirthday

public int initializeBirthday(TimeClock clock,
                              int ageHours,
                              Race R)
Description copied from interface: PlayerStats
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.

Specified by:
initializeBirthday in interface PlayerStats
Parameters:
clock - the local clock to use for month/day calculations
ageHours - the number of hours the player played
R - the players Race
Returns:
the players new age, in mud-years
See Also:
PlayerStats.getBirthday(), MOB.getAgeMinutes(), Race

getPrivateList

protected java.lang.String getPrivateList(java.util.Set<java.lang.String> h)

bumpPrideStat

public void bumpPrideStat(AccountStats.PrideStat stat,
                          int amt)
Description copied from interface: AccountStats
Add to one of the pride stats for this player or account

Specified by:
bumpPrideStat in interface AccountStats
Parameters:
stat - which pride stat to add to
amt - the amount to add
See Also:
AccountStats.PrideStat

getPrideStat

public int getPrideStat(TimeClock.TimePeriod period,
                        AccountStats.PrideStat stat)
Description copied from interface: AccountStats
Get one of the pride stats for this player or account

Specified by:
getPrideStat in interface AccountStats
Parameters:
period - the time period to get the number for
stat - which pride stat to get
Returns:
the pride stat value/count/whatever
See Also:
AccountStats.PrideStat

getXML

public java.lang.String getXML()
Description copied from interface: AccountStats
Returns an XML representation of all the data in this object, for persistent storage.

Specified by:
getXML in interface AccountStats
Returns:
an XML representation of all the data in this object
See Also:
AccountStats.setXML(String)

getExtraQualifiedSkills

public java.util.Map<java.lang.String,AbilityMapper.AbilityMapping> getExtraQualifiedSkills()
Description copied from interface: PlayerStats
Returns a mapping definition between awarded abilities and their requirements. These are always above and beyond whatever is provided by class, race, or clan.

Specified by:
getExtraQualifiedSkills in interface PlayerStats
Returns:
a skill mapping, keyed by ability ID()

setXML

public void setXML(java.lang.String xmlStr)
Description copied from interface: AccountStats
Restores the data in this object from an XML document.

Specified by:
setXML in interface AccountStats
Parameters:
xmlStr - an XML representation of all the data in this object
See Also:
AccountStats.getXML()

getSetSecurityFlags

public java.lang.String getSetSecurityFlags(java.lang.String newFlags)
Description copied from interface: PlayerStats
Returns and/or sets the security flags and groups strings to which this player is privileged. The sets should be semicolon delimited.

Specified by:
getSetSecurityFlags in interface PlayerStats
Parameters:
newFlags - null, or a semicolon list of flags and groups
Returns:
the official parsed list of flags and groups

getSecurityFlags

public CMSecurity.SecGroup getSecurityFlags()
Description copied from interface: PlayerStats
Returns a read-only Set of security flags that apply to this player. All groups are accounted for.

Specified by:
getSecurityFlags in interface PlayerStats
Returns:
a group of security flags

setPoofs

public void setPoofs(java.lang.String poofIn,
                     java.lang.String poofOut,
                     java.lang.String tranPoofIn,
                     java.lang.String tranPoofOut)
Description copied from interface: PlayerStats
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.

Specified by:
setPoofs in interface PlayerStats
Parameters:
poofIn - the msg seen when entering a room using GOTO
poofOut - the msg seen when leaving a room using TRANSFER
tranPoofIn - the msg seen when entering a room using GOTO
tranPoofOut - the msg seen when leaving a room using TRANSFER
See Also:
PlayerStats.getTranPoofIn(), PlayerStats.getTranPoofOut(), PlayerStats.getPoofIn(), PlayerStats.getPoofOut()

getHygiene

public long getHygiene()
Description copied from interface: PlayerStats
Returns a long value of how stinky this player is.

Specified by:
getHygiene in interface PlayerStats
Returns:
how stinky this player is
See Also:
PlayerStats.adjHygiene(long), PlayerStats.setHygiene(long), PlayerStats.HYGIENE_DELIMIT

setHygiene

public void setHygiene(long newVal)
Description copied from interface: PlayerStats
Sets the number meaning how stinky this player is.

Specified by:
setHygiene in interface PlayerStats
Parameters:
newVal - how stinky this player is.
See Also:
PlayerStats.getHygiene(), PlayerStats.adjHygiene(long), PlayerStats.HYGIENE_DELIMIT

adjHygiene

public boolean adjHygiene(long byThisMuch)
Description copied from interface: PlayerStats
Modifies, up or down, how stinky this player is.

Specified by:
adjHygiene in interface PlayerStats
Parameters:
byThisMuch - an amount to adjust the stinkiness by.
Returns:
true of the amount goes past the HYGIENE_DELIMIT constant
See Also:
PlayerStats.getHygiene(), PlayerStats.setHygiene(long), PlayerStats.HYGIENE_COMMONDIRTY, PlayerStats.HYGIENE_FIGHTDIRTY, PlayerStats.HYGIENE_WATERCLEAN, PlayerStats.HYGIENE_DELIMIT

getCombatSpams

public java.util.Map<java.lang.String,int[]> getCombatSpams()
Description copied from interface: PlayerStats
If the player has NoCombatSpam turned on, then these player settings are used to hold accumulated information about combat results for summarizing later. The map is between the name of the combatant and the amount of damage taken.

Specified by:
getCombatSpams in interface PlayerStats
Returns:
a combat damage map

getAccountExpiration

public long getAccountExpiration()
Description copied from interface: AccountStats
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)

Specified by:
getAccountExpiration in interface AccountStats
Returns:
the time, in milis, that this player expires.
See Also:
AccountStats.setAccountExpiration(long)

setAccountExpiration

public void setAccountExpiration(long newVal)
Description copied from interface: AccountStats
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)

Specified by:
setAccountExpiration in interface AccountStats
Parameters:
newVal - the time, in milis, that this player expires.
See Also:
AccountStats.getAccountExpiration()

addRoomVisit

public boolean addRoomVisit(Room R)
Description copied from interface: PlayerStats
Records the fact that this player has been to the given room.

Specified by:
addRoomVisit in interface PlayerStats
Parameters:
R - the room to credit the player with
Returns:
true if this was first visit, false otherwise
See Also:
PlayerStats.hasVisited(Room), PlayerStats.hasVisited(Area), PlayerStats.percentVisited(MOB, Area), PlayerStats.unVisit(Room), PlayerStats.unVisit(Area)

hasVisited

public boolean hasVisited(Room R)
Description copied from interface: PlayerStats
Returns whether this player has visited the given room.

Specified by:
hasVisited in interface PlayerStats
Parameters:
R - the room to check and see whether the player has been there.
Returns:
true if the player has been there, false otherwise.
See Also:
PlayerStats.hasVisited(Area), PlayerStats.percentVisited(MOB, Area), PlayerStats.addRoomVisit(Room), PlayerStats.unVisit(Room), PlayerStats.unVisit(Area)

hasVisited

public boolean hasVisited(Area A)
Description copied from interface: PlayerStats
Returns whether this player has visited the given area.

Specified by:
hasVisited in interface PlayerStats
Parameters:
A - the area to check
Returns:
true if the player has been there, false otherwise
See Also:
PlayerStats.hasVisited(Room), PlayerStats.percentVisited(MOB, Area), PlayerStats.addRoomVisit(Room), PlayerStats.unVisit(Room), PlayerStats.unVisit(Area)

unVisit

public void unVisit(Room R)
Description copied from interface: PlayerStats
Deletes the visitation record for the given room

Specified by:
unVisit in interface PlayerStats
Parameters:
R - the room to remove
See Also:
PlayerStats.hasVisited(Room), PlayerStats.hasVisited(Area), PlayerStats.percentVisited(MOB, Area), PlayerStats.unVisit(Area)

unVisit

public void unVisit(Area A)
Description copied from interface: PlayerStats
Deletes the visitation record for all rooms in the given area.

Specified by:
unVisit in interface PlayerStats
Parameters:
A - area of rooms to remove
See Also:
PlayerStats.hasVisited(Room), PlayerStats.hasVisited(Area), PlayerStats.percentVisited(MOB, Area), PlayerStats.unVisit(Room)

percentVisited

public int percentVisited(MOB mob,
                          Area A)
Description copied from interface: PlayerStats
Returns the percentage (0-100) of the given area that the given player has explored.

Specified by:
percentVisited in interface PlayerStats
Parameters:
mob - the player of these stats
A - the Area to check
Returns:
the percent of the area the player has explored
See Also:
PlayerStats.hasVisited(Room), PlayerStats.hasVisited(Area), PlayerStats.addRoomVisit(Room), PlayerStats.unVisit(Room), PlayerStats.unVisit(Area)

killAchievementTracker

public void killAchievementTracker(AchievementLibrary.Achievement A,
                                   MOB mob)
Description copied from interface: AccountStats
Deletes the tracker for the given achievement, for the given mob.

Specified by:
killAchievementTracker in interface AccountStats
Parameters:
A - the achievement to kill the tracker for
mob - the mob to delete a tracker for
See Also:
AccountStats.rebuildAchievementTracker(MOB, String), AchievementLibrary.Tracker, AchievementLibrary.Achievement

getAchievementTracker

public AchievementLibrary.Tracker getAchievementTracker(AchievementLibrary.Achievement A,
                                                        MOB mob)
Description copied from interface: AccountStats
Returns the tracker for the given achievement, for the given mob, or creates it if it does not exist.

Specified by:
getAchievementTracker in interface AccountStats
Parameters:
A - the achievement to get the tracker for
mob - the mob to create a tracker for
Returns:
the Tracker object that handles this achievement/mob
See Also:
see #killAchievementTracker(Achievement, MOB), AchievementLibrary.Tracker, AchievementLibrary.Achievement

rebuildAchievementTracker

public void rebuildAchievementTracker(MOB mob,
                                      java.lang.String achievementTattoo)
Description copied from interface: AccountStats
If an Achievement is modified or removed, this method will update the internal player tracker for that achievement. It does not delete old achievements per se, just their trackers!

Specified by:
rebuildAchievementTracker in interface AccountStats
Parameters:
mob - the mob to modify the tracker for.
achievementTattoo - the tattoo/id of the achievement
See Also:
AccountStats.getAchievementTracker(com.planet_ink.coffee_mud.Libraries.interfaces.AchievementLibrary.Achievement, MOB)

leveledDateTime

public long leveledDateTime(int level)
Description copied from interface: PlayerStats
The time, in milis since 1970, that the player gained the given level

Specified by:
leveledDateTime in interface PlayerStats
Parameters:
level - the level to check for
Returns:
the time, in milis since 1970, that the player gained the given level
See Also:
PlayerStats.setLeveledDateTime(int, long, Room)

leveledRoomID

public java.lang.String leveledRoomID(int level)
Description copied from interface: PlayerStats
The roomID that the player gained the given level

Specified by:
leveledRoomID in interface PlayerStats
Parameters:
level - the level to check for
Returns:
roomID that the player gained the given level
See Also:
PlayerStats.setLeveledDateTime(int, long, Room)

leveledMinutesPlayed

public long leveledMinutesPlayed(int level)
Description copied from interface: PlayerStats
The number of minutes played when the player gained the given level

Specified by:
leveledMinutesPlayed in interface PlayerStats
Parameters:
level - the level to check for
Returns:
the minutes played before the player gained the given level
See Also:
PlayerStats.setLeveledDateTime(int, long, Room)

setLeveledDateTime

public void setLeveledDateTime(int level,
                               long ageHours,
                               Room R)
Description copied from interface: PlayerStats
Notifies the player records that, at the moment this method was called, the player gained the given level.

Specified by:
setLeveledDateTime in interface PlayerStats
Parameters:
level - the level to set up
ageHours - the hours played at this point
R - the room in which the level was gained
See Also:
PlayerStats.leveledDateTime(int)

getTotalLegacyLevels

public int getTotalLegacyLevels()
Description copied from interface: PlayerStats
Returns the total legacy levels for this player, all categories

Specified by:
getTotalLegacyLevels in interface PlayerStats
Returns:
the total legacy levels for this player
See Also:
PlayerStats.addLegacyLevel(String), PlayerStats.getLegacyLevel(String)

addLegacyLevel

public void addLegacyLevel(java.lang.String category)
Description copied from interface: PlayerStats
Adds a new legacy level in the given category.

Specified by:
addLegacyLevel in interface PlayerStats
Parameters:
category - the category to add a legacy level for
See Also:
PlayerStats.getTotalLegacyLevels(), PlayerStats.getLegacyLevel(String)

getLegacyLevel

public int getLegacyLevel(java.lang.String category)
Description copied from interface: PlayerStats
Returns the legacy levels for this player, in the given categories

Specified by:
getLegacyLevel in interface PlayerStats
Parameters:
category - the category to add a legacy level for
Returns:
the legacy levels for this player this category
See Also:
PlayerStats.addLegacyLevel(String), PlayerStats.getTotalLegacyLevels()

getExtraQualifiedExpertises

public java.util.Map<java.lang.String,ExpertiseLibrary.ExpertiseDefinition> getExtraQualifiedExpertises()
Description copied from interface: PlayerStats
Returns a mapping definition between awarded expertise and their requirements. These are always above and beyond whatever is provided by class, race, or clan.

Specified by:
getExtraQualifiedExpertises in interface PlayerStats
Returns:
an expertise map

getAccount

public PlayerAccount getAccount()
Description copied from interface: PlayerStats
If the ACCOUNTSYSTEM is used, this will access the account object that is shared by all players of this account.

Specified by:
getAccount in interface PlayerStats
Returns:
the account object

setAccount

public void setAccount(PlayerAccount account)
Description copied from interface: PlayerStats
If the ACCOUNTSYSTEM is used, this will allow you to set the account object that is shared by all players of this account.

Specified by:
setAccount in interface PlayerStats
Parameters:
account - the account object

getExtItems

public ItemCollection getExtItems()
Description copied from interface: PlayerStats
Gets external items belonging to this player, which should be destroyed with the player, but can still be transient. These are items like player corpses, buried items, perhaps artifacts, or ships, vehicles, children, etc.

Specified by:
getExtItems in interface PlayerStats
Returns:
an item collection
See Also:
ItemCollection, Item

getBonusCharStatPoints

public int getBonusCharStatPoints()
Description copied from interface: AccountStats
Returns the number of bonus char stat points to assign to stats during character creation. This is independent of the account bonus.

Specified by:
getBonusCharStatPoints in interface AccountStats
Returns:
the number of bonus charstat points
See Also:
AccountStats.setBonusCharStatPoints(int)

setBonusCharStatPoints

public void setBonusCharStatPoints(int bonus)
Description copied from interface: AccountStats
Sets the number of bonus char stat points to assign to stats during character creation. This is independent of the account bonus.

Specified by:
setBonusCharStatPoints in interface AccountStats
Parameters:
bonus - the number of bonus charstat points
See Also:
AccountStats.getBonusCharStatPoints()

getBonusCommonSkillLimits

public int getBonusCommonSkillLimits()
Description copied from interface: AccountStats
Returns the number of bonus common skills available to this character. This is independent of the account bonus.

Specified by:
getBonusCommonSkillLimits in interface AccountStats
Returns:
the number of bonus Common points
See Also:
AccountStats.setBonusCommonSkillLimits(int)

setBonusCommonSkillLimits

public void setBonusCommonSkillLimits(int bonus)
Description copied from interface: AccountStats
Sets the number of bonus common skills available to this character. This is independent of the account bonus.

Specified by:
setBonusCommonSkillLimits in interface AccountStats
Parameters:
bonus - the number of bonus Common points
See Also:
AccountStats.getBonusCommonSkillLimits()

getBonusCraftingSkillLimits

public int getBonusCraftingSkillLimits()
Description copied from interface: AccountStats
Returns the number of bonus Crafting skills available to this character. This is independent of the account bonus.

Specified by:
getBonusCraftingSkillLimits in interface AccountStats
Returns:
the number of bonus Crafting points
See Also:
AccountStats.setBonusCraftingSkillLimits(int)

setBonusCraftingSkillLimits

public void setBonusCraftingSkillLimits(int bonus)
Description copied from interface: AccountStats
Sets the number of bonus Crafting skills available to this character. This is independent of the account bonus.

Specified by:
setBonusCraftingSkillLimits in interface AccountStats
Parameters:
bonus - the number of bonus Crafting points
See Also:
AccountStats.getBonusCraftingSkillLimits()

getBonusNonCraftingSkillLimits

public int getBonusNonCraftingSkillLimits()
Description copied from interface: AccountStats
Returns the number of bonus Gathering skills available to this character. This is independent of the account bonus.

Specified by:
getBonusNonCraftingSkillLimits in interface AccountStats
Returns:
the number of bonus Gathering points
See Also:
AccountStats.setBonusNonCraftingSkillLimits(int)

setBonusNonCraftingSkillLimits

public void setBonusNonCraftingSkillLimits(int bonus)
Description copied from interface: AccountStats
Sets the number of bonus Gathering skills available to this character. This is independent of the account bonus.

Specified by:
setBonusNonCraftingSkillLimits in interface AccountStats
Parameters:
bonus - the number of bonus Gathering points
See Also:
AccountStats.getBonusNonCraftingSkillLimits()

getBonusLanguageLimits

public int getBonusLanguageLimits()
Description copied from interface: AccountStats
Returns the number of bonus Language skills available to this character. This is independent of the account bonus.

Specified by:
getBonusLanguageLimits in interface AccountStats
Returns:
the number of bonus Language points
See Also:
AccountStats.setBonusLanguageLimits(int)

setBonusLanguageLimits

public void setBonusLanguageLimits(int bonus)
Description copied from interface: AccountStats
Sets the number of bonus Language skills available to this character. This is independent of the account bonus.

Specified by:
setBonusLanguageLimits in interface AccountStats
Parameters:
bonus - the number of bonus Language points
See Also:
AccountStats.getBonusLanguageLimits()

getMaxRolePlayXP

public int getMaxRolePlayXP()
Description copied from interface: PlayerStats
Returns the maximum amount of role playing xp that this player can be awarded, typically over a given level.

Specified by:
getMaxRolePlayXP in interface PlayerStats
Returns:
the maximum amount of role playing xp
See Also:
PlayerStats.setMaxRolePlayXP(int), PlayerStats.getRolePlayXP(), PlayerStats.setRolePlayXP(int), AccountStats.setLastDateTime(long), PlayerStats.getLastRolePlayXPTime()

setMaxRolePlayXP

public void setMaxRolePlayXP(int amt)
Description copied from interface: PlayerStats
Sets the maximum amount of role playing xp that this player can be awarded, typically over a given level.

Specified by:
setMaxRolePlayXP in interface PlayerStats
Parameters:
amt - the maximum amount of role playing xp
See Also:
PlayerStats.getMaxRolePlayXP(), PlayerStats.getRolePlayXP(), PlayerStats.setRolePlayXP(int), AccountStats.setLastDateTime(long), PlayerStats.getLastRolePlayXPTime()

getRolePlayXP

public int getRolePlayXP()
Description copied from interface: PlayerStats
Returns the current amount of role playing xp that this player has been awarded, typically over a given level.

Specified by:
getRolePlayXP in interface PlayerStats
Returns:
the maximum amount of role playing xp
See Also:
PlayerStats.setMaxRolePlayXP(int), PlayerStats.getMaxRolePlayXP(), PlayerStats.setRolePlayXP(int), AccountStats.setLastDateTime(long), PlayerStats.getLastRolePlayXPTime()

setRolePlayXP

public void setRolePlayXP(int amt)
Description copied from interface: PlayerStats
Sets the amount of role playing xp that this player has been awarded, typically over a given level.

Specified by:
setRolePlayXP in interface PlayerStats
Parameters:
amt - the maximum amount of role playing xp
See Also:
PlayerStats.getMaxRolePlayXP(), PlayerStats.getRolePlayXP(), PlayerStats.setMaxRolePlayXP(int), AccountStats.setLastDateTime(long), PlayerStats.getLastRolePlayXPTime()

getLastRolePlayXPTime

public long getLastRolePlayXPTime()
Description copied from interface: PlayerStats
Returns the last time roleplay xp was earned in a way that could be spammed.

Specified by:
getLastRolePlayXPTime in interface PlayerStats
Returns:
the last time roleplay xp
See Also:
PlayerStats.setMaxRolePlayXP(int), PlayerStats.getMaxRolePlayXP(), PlayerStats.setRolePlayXP(int), PlayerStats.getRolePlayXP(), AccountStats.setLastDateTime(long)

setLastRolePlayXPTime

public void setLastRolePlayXPTime(long tm)
Description copied from interface: PlayerStats
Sets the last time roleplay xp was earned in a way that could be spammed.

Specified by:
setLastRolePlayXPTime in interface PlayerStats
Parameters:
tm - the last time roleplay xp
See Also:
PlayerStats.getMaxRolePlayXP(), PlayerStats.getRolePlayXP(), PlayerStats.setRolePlayXP(int), PlayerStats.setMaxRolePlayXP(int), PlayerStats.getLastRolePlayXPTime()

getMaxDeferredXP

public int getMaxDeferredXP()
Description copied from interface: PlayerStats
Returns the maximum amount of deferred xp that this player can be awarded, typically over a given level.

Specified by:
getMaxDeferredXP in interface PlayerStats
Returns:
the maximum amount of deferred xp
See Also:
PlayerStats.setMaxDeferredXP(int), PlayerStats.getDeferredXP(), PlayerStats.setDeferredXP(int)

setMaxDeferredXP

public void setMaxDeferredXP(int amt)
Description copied from interface: PlayerStats
Sets the maximum amount of deferred xp that this player can be awarded, typically over a given level.

Specified by:
setMaxDeferredXP in interface PlayerStats
Parameters:
amt - the maximum amount of deferred xp
See Also:
PlayerStats.getMaxDeferredXP(), PlayerStats.getDeferredXP(), PlayerStats.setDeferredXP(int)

getDeferredXP

public int getDeferredXP()
Description copied from interface: PlayerStats
Returns the current amount of deferred xp that this player has been awarded, typically over a given level.

Specified by:
getDeferredXP in interface PlayerStats
Returns:
the maximum amount of deferred xp
See Also:
PlayerStats.setMaxDeferredXP(int), PlayerStats.getMaxDeferredXP(), PlayerStats.setDeferredXP(int)

setDeferredXP

public void setDeferredXP(int amt)
Description copied from interface: PlayerStats
Sets the amount of deferred xp that this player has been awarded, typically over a given level.

Specified by:
setDeferredXP in interface PlayerStats
Parameters:
amt - the maximum amount of deferred xp
See Also:
PlayerStats.getMaxDeferredXP(), PlayerStats.getDeferredXP(), PlayerStats.setMaxDeferredXP(int)

getLastXPAwardMillis

public long getLastXPAwardMillis()
Description copied from interface: PlayerStats
Returns the last time this player has been awarded XP. This is used for the guildmaster exception, where XP is only awarded under certain conditions.

Specified by:
getLastXPAwardMillis in interface PlayerStats
Returns:
the last time this player has been awarded

setLastXPAwardMillis

public void setLastXPAwardMillis(long time)
Description copied from interface: PlayerStats
Sets the last time this player has been awarded XP. This is used for the guildmaster exception, where XP is only awarded under certain conditions.

Specified by:
setLastXPAwardMillis in interface PlayerStats
Parameters:
time - the time xp was awarded in millis

getStat

public java.lang.String getStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
getStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
the value of the field read
See Also:
Modifiable.getStatCodes()

setStat

public void setStat(java.lang.String code,
                    java.lang.String val)
Description copied from interface: Modifiable
An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. The value passed in is always a string, even if the field itself is numeric or a list.

Specified by:
setStat in interface Modifiable
Parameters:
code - the name of the field to set
val - the value to set the field to
See Also:
Modifiable.getStatCodes()

isOnAutoInvokeList

public boolean isOnAutoInvokeList(java.lang.String abilityID)
Description copied from interface: PlayerStats
Checks whether the given ability ID is on the list of those skills whose autoInvocation should be suppressed. The abilityID is case sensitive, and you can send the fake ID "ANYTHIN" to check if ANY skills are on the list.

Specified by:
isOnAutoInvokeList in interface PlayerStats
Parameters:
abilityID - the ability ID() to suppress
Returns:
true if it is on the list, false otherwise

addAutoInvokeList

public void addAutoInvokeList(java.lang.String abilityID)
Description copied from interface: PlayerStats
Adds the given ability ID is on the list of those skills whose autoInvocation should be suppressed. The abilityID is case sensitive.

Specified by:
addAutoInvokeList in interface PlayerStats
Parameters:
abilityID - the ability ID() to add

removeAutoInvokeList

public void removeAutoInvokeList(java.lang.String abilityID)
Description copied from interface: PlayerStats
Removes the given ability ID is on the list of those skills whose autoInvocation should be suppressed. The abilityID is case sensitive.

Specified by:
removeAutoInvokeList in interface PlayerStats
Parameters:
abilityID - the ability ID() to remove

getSaveStatIndex

public int getSaveStatIndex()
Description copied from interface: Modifiable
Returns the index into the stat codes array where extra savable fields begins. This number is always the same as getStatCodes().length unless there are extra fields which need to be saved in xml for generic objects. This method is used by editors for post-build user-defined fields.

Specified by:
getSaveStatIndex in interface Modifiable
Returns:
the index into getStatCodes()
See Also:
Modifiable.getStatCodes(), Modifiable.getStat(String), Modifiable.setStat(String, String)

getStatCodes

public java.lang.String[] getStatCodes()
Description copied from interface: Modifiable
Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.

Specified by:
getStatCodes in interface Modifiable
Returns:
list of the fields which may be set.
See Also:
Modifiable.getStat(String), Modifiable.setStat(String, String)

isStat

public boolean isStat(java.lang.String code)
Description copied from interface: Modifiable
An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders. See getStatCodes() for possible values for the code passed to this method. Values returned are always strings, even if the field itself is numeric or a list.

Specified by:
isStat in interface Modifiable
Parameters:
code - the name of the field to read.
Returns:
true if the code is a real value, false otherwise
See Also:
Modifiable.getStatCodes()

getCodeNum

protected int getCodeNum(java.lang.String code)

sameAs

public boolean sameAs(PlayerStats E)
Description copied from interface: PlayerStats
Whether this object instance is functionally identical to the object passed in. Works by repeatedly calling getStat on both objects and comparing the values.

Specified by:
sameAs in interface PlayerStats
Parameters:
E - the object to compare this one to
Returns:
whether this object is the same as the one passed in
See Also:
Modifiable.getStatCodes(), Modifiable.getStat(String)

compareTo

public int compareTo(CMObject o)
Specified by:
compareTo in interface java.lang.Comparable<CMObject>

destroy

public void destroy()
Description copied from interface: Contingent
Utterly and permanently destroy this object, not only removing it from the map, but causing this object to be collected as garbage by Java. Containers, rooms. and mobs who have their destroy() method called will also call the destroy() methods on all items and other objects listed as content, recursively.

Specified by:
destroy in interface Contingent

isSavable

public boolean isSavable()
Description copied from interface: Contingent
Whether, if this object is in a room, whether it is appropriate to save this object to the database as a permanent feature of its container. It always returns true except under unique circumstances.

Specified by:
isSavable in interface Contingent
Returns:
true, usually.

amDestroyed

public boolean amDestroyed()
Description copied from interface: Contingent
Whether the destroy() method has been previousy called on this object.

Specified by:
amDestroyed in interface Contingent
Returns:
whether the object is destroy()ed.

setSavable

public void setSavable(boolean truefalse)
Description copied from interface: Contingent
Sets whether this object can be saved as a permanent aspect of its host.

Specified by:
setSavable in interface Contingent
Parameters:
truefalse - whether this behavior can be saved as part of its host.
See Also:
Contingent.isSavable()