com.planet_ink.coffee_mud.Common
Class DefaultPlayerAccount

java.lang.Object
  extended by com.planet_ink.coffee_mud.Common.DefaultPlayerAccount
All Implemented Interfaces:
AccountStats, CMCommon, PlayerAccount, CMObject, Modifiable, Tattooable, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class DefaultPlayerAccount
extends java.lang.Object
implements PlayerAccount


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.PlayerAccount
PlayerAccount.AccountFlag
 
Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.AccountStats
AccountStats.Agent, AccountStats.PrideStat
 
Field Summary
protected  long accountExpiration
           
protected  java.lang.String accountName
           
protected  java.util.Set<PlayerAccount.AccountFlag> acctFlags
           
protected  java.util.Map<java.lang.String,AchievementLibrary.Tracker> achievementers
           
protected  int bonusCharLimit
           
protected  int bonusCharOnlineLimit
           
protected  int bonusCharStatPt
           
protected  int bonusCommonSk
           
protected  int bonusCraftSk
           
protected  int bonusLanguages
           
protected  int bonusNonCraftSk
           
protected static java.lang.String[] CODES
           
protected  java.lang.String email
           
protected  MOB fakePlayerM
           
protected  SHashSet<java.lang.String> friends
           
protected  SHashSet<java.lang.String> ignored
           
protected  long lastDateTime
           
protected  java.lang.String lastIP
           
protected  long lastUpdated
           
protected  java.lang.String notes
           
protected  java.lang.String password
           
protected  SVector<java.lang.String> players
           
protected  long[] prideExpireTime
           
protected  int[][] prideStats
           
protected  CMUniqNameSortSVec<Tattoo> tattoos
           
protected  SVector<PlayerLibrary.ThinPlayer> thinPlayers
           
protected  java.lang.String[] xtraValues
           
 
Constructor Summary
DefaultPlayerAccount()
           
 
Method Summary
 void addNewPlayer(MOB mob)
          Adds a new player to this account.
 void addTattoo(java.lang.String of)
          Manipulation of the tatoo list
 void addTattoo(java.lang.String of, int tickDown)
          Add a new tattoo to this object
 void addTattoo(Tattoo of)
          Add a new tattoo to 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)
           
 void copyInto(PlayerAccount otherAccount)
          Populates this account object with all the data from the given one, replacing any existing internal data.
 CMObject copyOf()
          Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed.
 void delPlayer(MOB mob)
          Removes a player from this account.
 void delPlayer(java.lang.String name)
          Removes a player of this name from this account.
 void delTattoo(java.lang.String of)
          Remove a specific tattoo from this object
 void delTattoo(Tattoo of)
          Remove a specific tattoo from this object
 java.lang.String findPlayer(java.lang.String name)
          Returns the real name if the player is on this account
 Tattoo findTattoo(java.lang.String of)
          Returns the tattoo of the given marker name
 Tattoo findTattooStartsWith(java.lang.String of)
          Returns the tattoo that starts with the given marker name
 long getAccountExpiration()
          If the ACCOUNT system is used, this returns the time, in milis since 1970, that this account will expire (meaning the player will no longer be able to log in)
 MOB getAccountMob()
          Retrieves a fake account mob, for forum and other access systems not directly relayed to gameplay.
 java.lang.String getAccountName()
          Returns this accounts name
 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.
 int getBonusCharsLimit()
          Returns the number of bonus characters available to this account.
 int getBonusCharsOnlineLimit()
          Returns the number of bonus characters online available to this account.
 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.
protected  int getCodeNum(java.lang.String code)
           
 java.lang.String getEmail()
          Returns the players email address, if available.
 java.util.Set<java.lang.String> getFriends()
          Returns a modifiable Set that contains the set of player Names that constitutes this players friends.
protected  SHashSet<java.lang.String> getHashFrom(java.lang.String str)
           
 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 getLastUpdated()
          The time, in milis since 1970, that the player was last saved.
 java.util.Enumeration<MOB> getLoadPlayers()
          Return an enumeration of the fully loaded players that belong to this account.
 java.lang.String getNotes()
          Returns the administrative notes entered about this player.
 java.lang.String getPasswordStr()
          Returns the players password, perhaps encoded, perhaps plain text.
 java.util.Enumeration<java.lang.String> getPlayers()
          Return an enumeration of the players names that belong to this account.
 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)
           
 int getSaveStatIndex()
          Returns the index into the stat codes array where extra savable fields begins.
 java.lang.String getStat(java.lang.String code)
          An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders.
 java.lang.String[] getStatCodes()
          Returns an array of the string names of those fields which are modifiable on this object at run-time by builders.
 java.util.Enumeration<PlayerLibrary.ThinPlayer> getThinPlayers()
          Return an enumeration of the semi-loaded players that belong to this account.
 java.lang.String getXML()
          Returns an XML representation of all the data in this object, for persistent storage.
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 void initializeClass()
          Called ONCE after all objects are loaded, but before the map is read in during initialization.
 boolean 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 isSet(PlayerAccount.AccountFlag flag)
          Checks whether the given string flag is set for this account.
 boolean isStat(java.lang.String code)
          An alternative means of retreiving the values of those fields on this object which are modifiable at run-time by builders.
 void killAchievementTracker(AchievementLibrary.Achievement A, MOB mob)
          Deletes the tracker for the given achievement, for the given mob.
 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 numPlayers()
          Returns the number of players this account currently has listed.
 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.
 boolean sameAs(PlayerAccount E)
           
 void setAccountExpiration(long newVal)
          If the ACCOUNT system is used, this sets the time, in milis since 1970, that this account will expire (meaning the player will no longer be able to log in)
 void setAccountName(java.lang.String name)
          Sets this accounts unique name
 void setBonusCharsLimit(int bonus)
          Sets the number of bonus characters available to this account.
 void setBonusCharsOnlineLimit(int bonus)
          Sets the number of bonus characters online available to this account.
 void 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 setEmail(java.lang.String newAdd)
          Sets the players email address, if available.
 void setFlag(PlayerAccount.AccountFlag flag, boolean setOrUnset)
          Sets or unsets an account-wide flag.
 void setLastDateTime(long C)
          Sets the time, in milis since 1970, that the player last logged off.
 void setLastIP(java.lang.String ip)
          Sets the last IP address this player logged in from.
 void setLastUpdated(long time)
          Sets the time, in milis since 1970, that the player was last saved.
 void setNotes(java.lang.String newnotes)
          Sets the administrative notes entered about this player.
 void setPassword(java.lang.String newPassword)
          Sets the players password.
 void setPlayerNames(java.util.List<java.lang.String> names)
          Sets the names of all the players that belong to this account
 void setStat(java.lang.String code, java.lang.String val)
          An alternative means of setting the values of those fields on this object which are modifiable at run-time by builders.
 void setXML(java.lang.String str)
          Restores the data in this object from an XML document.
 java.util.Enumeration<Tattoo> tattoos()
          Returns an enumeration of all the tattoos on this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

friends

protected SHashSet<java.lang.String> friends

ignored

protected SHashSet<java.lang.String> ignored

players

protected SVector<java.lang.String> players

accountName

protected java.lang.String accountName

lastIP

protected java.lang.String lastIP

lastDateTime

protected long lastDateTime

lastUpdated

protected long lastUpdated

email

protected java.lang.String email

password

protected java.lang.String password

notes

protected java.lang.String notes

accountExpiration

protected long accountExpiration

bonusCommonSk

protected int bonusCommonSk

bonusCraftSk

protected int bonusCraftSk

bonusNonCraftSk

protected int bonusNonCraftSk

bonusLanguages

protected int bonusLanguages

bonusCharStatPt

protected int bonusCharStatPt

bonusCharLimit

protected int bonusCharLimit

bonusCharOnlineLimit

protected int bonusCharOnlineLimit

xtraValues

protected java.lang.String[] xtraValues

acctFlags

protected java.util.Set<PlayerAccount.AccountFlag> acctFlags

fakePlayerM

protected volatile MOB fakePlayerM

prideExpireTime

protected long[] prideExpireTime

prideStats

protected int[][] prideStats

thinPlayers

protected SVector<PlayerLibrary.ThinPlayer> thinPlayers

achievementers

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

tattoos

protected CMUniqNameSortSVec<Tattoo> tattoos

CODES

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

DefaultPlayerAccount

public DefaultPlayerAccount()
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

copyInto

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

Specified by:
copyInto in interface PlayerAccount
Parameters:
otherAccount - the data to copy from.

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()

getLastUpdated

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

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

setLastUpdated

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

Specified by:
setLastUpdated in interface AccountStats
Parameters:
time - the time, in milis since 1970, that the player was last saved.
See Also:
AccountStats.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()

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()

getHashFrom

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

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)

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

getAccountMob

public MOB getAccountMob()
Description copied from interface: PlayerAccount
Retrieves a fake account mob, for forum and other access systems not directly relayed to gameplay.

Specified by:
getAccountMob in interface PlayerAccount
Returns:
mob the fake player.

getPrivateList

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

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)

setXML

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

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

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()

getAccountName

public java.lang.String getAccountName()
Description copied from interface: PlayerAccount
Returns this accounts name

Specified by:
getAccountName in interface PlayerAccount
Returns:
this accounts name

setAccountName

public void setAccountName(java.lang.String name)
Description copied from interface: PlayerAccount
Sets this accounts unique name

Specified by:
setAccountName in interface PlayerAccount
Parameters:
name - the accounts name

addNewPlayer

public void addNewPlayer(MOB mob)
Description copied from interface: PlayerAccount
Adds a new player to this account.

Specified by:
addNewPlayer in interface PlayerAccount
Parameters:
mob - the new player to add.

findPlayer

public java.lang.String findPlayer(java.lang.String name)
Description copied from interface: PlayerAccount
Returns the real name if the player is on this account

Specified by:
findPlayer in interface PlayerAccount
Parameters:
name - the name look for check
Returns:
real name if it exists and null otherwise

delPlayer

public void delPlayer(java.lang.String name)
Description copied from interface: PlayerAccount
Removes a player of this name from this account.

Specified by:
delPlayer in interface PlayerAccount
Parameters:
name - the name of the player to remove.

delPlayer

public void delPlayer(MOB mob)
Description copied from interface: PlayerAccount
Removes a player from this account. This is typically a precursor to deleting the player.

Specified by:
delPlayer in interface PlayerAccount
Parameters:
mob - the player to delete.

getLoadPlayers

public java.util.Enumeration<MOB> getLoadPlayers()
Description copied from interface: PlayerAccount
Return an enumeration of the fully loaded players that belong to this account.

Specified by:
getLoadPlayers in interface PlayerAccount
Returns:
an enumeration of player mob objects

getThinPlayers

public java.util.Enumeration<PlayerLibrary.ThinPlayer> getThinPlayers()
Description copied from interface: PlayerAccount
Return an enumeration of the semi-loaded players that belong to this account.

Specified by:
getThinPlayers in interface PlayerAccount
Returns:
an enumeration of thinplayer objects

getPlayers

public java.util.Enumeration<java.lang.String> getPlayers()
Description copied from interface: PlayerAccount
Return an enumeration of the players names that belong to this account.

Specified by:
getPlayers in interface PlayerAccount
Returns:
an enumeration of player names

setPlayerNames

public void setPlayerNames(java.util.List<java.lang.String> names)
Description copied from interface: PlayerAccount
Sets the names of all the players that belong to this account

Specified by:
setPlayerNames in interface PlayerAccount
Parameters:
names - the names of the players

numPlayers

public int numPlayers()
Description copied from interface: PlayerAccount
Returns the number of players this account currently has listed.

Specified by:
numPlayers in interface PlayerAccount
Returns:
the number of players

isSet

public boolean isSet(PlayerAccount.AccountFlag flag)
Description copied from interface: PlayerAccount
Checks whether the given string flag is set for this account.

Specified by:
isSet in interface PlayerAccount
Parameters:
flag - the flag name
Returns:
true if it is set, false if not
See Also:
PlayerAccount.setFlag(AccountFlag, boolean)

setFlag

public void setFlag(PlayerAccount.AccountFlag flag,
                    boolean setOrUnset)
Description copied from interface: PlayerAccount
Sets or unsets an account-wide flag.

Specified by:
setFlag in interface PlayerAccount
Parameters:
flag - the flag name
setOrUnset - true to set it, false to unset
See Also:
PlayerAccount.isSet(AccountFlag)

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)

addTattoo

public void addTattoo(java.lang.String of)
Manipulation of the tatoo list

Specified by:
addTattoo in interface Tattooable
Parameters:
of - the permanent tattoo name to add
See Also:
Tattooable, Tattooable.addTattoo(String, int), Tattooable.addTattoo(Tattoo)

addTattoo

public void addTattoo(java.lang.String of,
                      int tickDown)
Description copied from interface: Tattooable
Add a new tattoo to this object

Specified by:
addTattoo in interface Tattooable
Parameters:
of - the permanent tattoo name to add
tickDown - the ticks of life for this tattoo
See Also:
Tattooable, Tattooable.addTattoo(String), Tattooable.addTattoo(Tattoo)

delTattoo

public void delTattoo(java.lang.String of)
Description copied from interface: Tattooable
Remove a specific tattoo from this object

Specified by:
delTattoo in interface Tattooable
Parameters:
of - the tattoo name of the tattoo to remove
See Also:
Tattooable, Tattooable.delTattoo(Tattoo)

addTattoo

public void addTattoo(Tattoo of)
Description copied from interface: Tattooable
Add a new tattoo to this object

Specified by:
addTattoo in interface Tattooable
Parameters:
of - the tattoo object to add
See Also:
Tattooable, Tattooable.addTattoo(String, int), Tattooable.addTattoo(String)

delTattoo

public void delTattoo(Tattoo of)
Description copied from interface: Tattooable
Remove a specific tattoo from this object

Specified by:
delTattoo in interface Tattooable
Parameters:
of - the tattoo object to remove
See Also:
Tattooable, Tattooable.delTattoo(String)

tattoos

public java.util.Enumeration<Tattoo> tattoos()
Description copied from interface: Tattooable
Returns an enumeration of all the tattoos on this object.

Specified by:
tattoos in interface Tattooable
Returns:
an enumeration of all the tattoos on this object.
See Also:
Tattooable

findTattoo

public Tattoo findTattoo(java.lang.String of)
Description copied from interface: Tattooable
Returns the tattoo of the given marker name

Specified by:
findTattoo in interface Tattooable
Parameters:
of - the marker name to return a tattoo for
Returns:
the tattoo of the given marker name
See Also:
Tattooable, Tattooable.findTattooStartsWith(String)

findTattooStartsWith

public Tattoo findTattooStartsWith(java.lang.String of)
Description copied from interface: Tattooable
Returns the tattoo that starts with the given marker name

Specified by:
findTattooStartsWith in interface Tattooable
Parameters:
of - the marker name to return a tattoo starter for
Returns:
the tattoo that starts with the given marker name
See Also:
Tattooable, Tattooable.findTattoo(String)

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()

getBonusCharsOnlineLimit

public int getBonusCharsOnlineLimit()
Description copied from interface: PlayerAccount
Returns the number of bonus characters online available to this account.

Specified by:
getBonusCharsOnlineLimit in interface PlayerAccount
Returns:
the number of bonus chars online
See Also:
PlayerAccount.setBonusCharsOnlineLimit(int)

setBonusCharsOnlineLimit

public void setBonusCharsOnlineLimit(int bonus)
Description copied from interface: PlayerAccount
Sets the number of bonus characters online available to this account.

Specified by:
setBonusCharsOnlineLimit in interface PlayerAccount
Parameters:
bonus - the number of bonus chars online
See Also:
PlayerAccount.getBonusCharsOnlineLimit()

getBonusCharsLimit

public int getBonusCharsLimit()
Description copied from interface: PlayerAccount
Returns the number of bonus characters available to this account.

Specified by:
getBonusCharsLimit in interface PlayerAccount
Returns:
the number of bonus chars
See Also:
PlayerAccount.setBonusCharsLimit(int)

setBonusCharsLimit

public void setBonusCharsLimit(int bonus)
Description copied from interface: PlayerAccount
Sets the number of bonus characters available to this account.

Specified by:
setBonusCharsLimit in interface PlayerAccount
Parameters:
bonus - the number of bonus chars
See Also:
PlayerAccount.getBonusCharsLimit()

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()

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(PlayerAccount E)

compareTo

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