com.planet_ink.coffee_mud.Common.interfaces
Interface AccountStats

All Superinterfaces:
java.lang.Cloneable, CMCommon, CMObject, java.lang.Comparable<CMObject>
All Known Subinterfaces:
PlayerAccount, PlayerStats
All Known Implementing Classes:
DefaultPlayerAccount, DefaultPlayerStats

public interface AccountStats
extends CMCommon

An interface for a base player account. Shared by PlayerAccount and PlayerStats (since the account system is optional)


Nested Class Summary
static class AccountStats.Agent
          A simple enum for picking between a player and an account
static class AccountStats.PrideStat
          The recorded player and account statistics.
 
Method Summary
 void bumpPrideStat(AccountStats.PrideStat stat, int amt)
          Add to one of the pride stats for this player or 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.
 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.
 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.
 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.lang.String getNotes()
          Returns the administrative notes entered about this player.
 java.lang.String getPasswordStr()
          Returns the players password, perhaps encoded, perhaps plain text.
 int getPrideStat(TimeClock.TimePeriod period, AccountStats.PrideStat stat)
          Get one of the pride stats for this player or account
 java.lang.String getXML()
          Returns an XML representation of all the data in this object, for persistent storage.
 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.
 void killAchievementTracker(AchievementLibrary.Achievement A, MOB mob)
          Deletes the tracker for the given achievement, for the given mob.
 boolean matchesPassword(java.lang.String str)
          Returns the players password, perhaps encoded, perhaps plain text.
 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 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 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 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 setXML(java.lang.String str)
          Restores the data in this object from an XML document.
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, name, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getEmail

java.lang.String getEmail()
Returns the players email address, if available.

Returns:
the players email address, if available.
See Also:
setEmail(String)

setEmail

void setEmail(java.lang.String newAdd)
Sets the players email address, if available.

Parameters:
newAdd - the players email address, if available.
See Also:
getEmail()

getLastDateTime

long getLastDateTime()
The time, in milis since 1970, that the player last logged off.

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

setLastDateTime

void setLastDateTime(long C)
Sets the time, in milis since 1970, that the player last logged off.

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

getLastUpdated

long getLastUpdated()
The time, in milis since 1970, that the player was last saved.

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

setLastUpdated

void setLastUpdated(long time)
Sets the time, in milis since 1970, that the player was last saved.

Parameters:
time - the time, in milis since 1970, that the player was last saved.
See Also:
getLastUpdated()

getPasswordStr

java.lang.String getPasswordStr()
Returns the players password, perhaps encoded, perhaps plain text. Use matchesPassword(String) to do actual checks.

Returns:
the players password.
See Also:
setPassword(String), matchesPassword(String)

matchesPassword

boolean matchesPassword(java.lang.String str)
Returns the players password, perhaps encoded, perhaps plain text. Use matchesPassword(String) to do actual checks.

Parameters:
str - the password to compare reality to
Returns:
the players password.
See Also:
setPassword(String), getPasswordStr()

setPassword

void setPassword(java.lang.String newPassword)
Sets the players password.

Parameters:
newPassword - the players password.
See Also:
getPasswordStr(), matchesPassword(String)

getLastIP

java.lang.String getLastIP()
The last IP address this player logged in from.

Returns:
the last IP address this player logged in from.
See Also:
setLastIP(String)

setLastIP

void setLastIP(java.lang.String ip)
Sets the last IP address this player logged in from.

Parameters:
ip - the last IP address this player logged in from.
See Also:
getLastIP()

getAccountExpiration

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)

Returns:
the time, in milis, that this player expires.
See Also:
setAccountExpiration(long)

setAccountExpiration

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)

Parameters:
newVal - the time, in milis, that this player expires.
See Also:
getAccountExpiration()

getNotes

java.lang.String getNotes()
Returns the administrative notes entered about this player.

Returns:
the administrative notes entered about this player.
See Also:
setNotes(String)

setNotes

void setNotes(java.lang.String newnotes)
Sets the administrative notes entered about this player.

Parameters:
newnotes - the administrative notes entered about this player.
See Also:
getNotes()

getBonusCharStatPoints

int getBonusCharStatPoints()
Returns the number of bonus char stat points to assign to stats during character creation. This is independent of the account bonus.

Returns:
the number of bonus charstat points
See Also:
setBonusCharStatPoints(int)

setBonusCharStatPoints

void setBonusCharStatPoints(int bonus)
Sets the number of bonus char stat points to assign to stats during character creation. This is independent of the account bonus.

Parameters:
bonus - the number of bonus charstat points
See Also:
getBonusCharStatPoints()

getBonusCommonSkillLimits

int getBonusCommonSkillLimits()
Returns the number of bonus common skills available to this character. This is independent of the account bonus.

Returns:
the number of bonus Common points
See Also:
setBonusCommonSkillLimits(int)

setBonusCommonSkillLimits

void setBonusCommonSkillLimits(int bonus)
Sets the number of bonus common skills available to this character. This is independent of the account bonus.

Parameters:
bonus - the number of bonus Common points
See Also:
getBonusCommonSkillLimits()

getBonusCraftingSkillLimits

int getBonusCraftingSkillLimits()
Returns the number of bonus Crafting skills available to this character. This is independent of the account bonus.

Returns:
the number of bonus Crafting points
See Also:
setBonusCraftingSkillLimits(int)

setBonusCraftingSkillLimits

void setBonusCraftingSkillLimits(int bonus)
Sets the number of bonus Crafting skills available to this character. This is independent of the account bonus.

Parameters:
bonus - the number of bonus Crafting points
See Also:
getBonusCraftingSkillLimits()

getBonusNonCraftingSkillLimits

int getBonusNonCraftingSkillLimits()
Returns the number of bonus Gathering skills available to this character. This is independent of the account bonus.

Returns:
the number of bonus Gathering points
See Also:
setBonusNonCraftingSkillLimits(int)

setBonusNonCraftingSkillLimits

void setBonusNonCraftingSkillLimits(int bonus)
Sets the number of bonus Gathering skills available to this character. This is independent of the account bonus.

Parameters:
bonus - the number of bonus Gathering points
See Also:
getBonusNonCraftingSkillLimits()

getBonusLanguageLimits

int getBonusLanguageLimits()
Returns the number of bonus Language skills available to this character. This is independent of the account bonus.

Returns:
the number of bonus Language points
See Also:
setBonusLanguageLimits(int)

setBonusLanguageLimits

void setBonusLanguageLimits(int bonus)
Sets the number of bonus Language skills available to this character. This is independent of the account bonus.

Parameters:
bonus - the number of bonus Language points
See Also:
getBonusLanguageLimits()

getFriends

java.util.Set<java.lang.String> getFriends()
Returns a modifiable Set that contains the set of player Names that constitutes this players friends.

Returns:
a set of player friend names

getIgnored

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.

Returns:
a set of player ignored player list Names
See Also:
isIgnored(String), isIgnored(MOB)

isIgnored

boolean isIgnored(MOB mob)
Returns whether the given player is being ignored.

Parameters:
mob - the mob to check
Returns:
true if the given mob is ignored
See Also:
getIgnored(), isIgnored(String)

isIgnored

boolean isIgnored(java.lang.String name)
Returns whether the given player name is being ignored.

Parameters:
name - the name to check
Returns:
true if the given name is ignored
See Also:
getIgnored(), isIgnored(MOB)

bumpPrideStat

void bumpPrideStat(AccountStats.PrideStat stat,
                   int amt)
Add to one of the pride stats for this player or account

Parameters:
stat - which pride stat to add to
amt - the amount to add
See Also:
AccountStats.PrideStat

getPrideStat

int getPrideStat(TimeClock.TimePeriod period,
                 AccountStats.PrideStat stat)
Get one of the pride stats for this player or account

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

getAchievementTracker

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.

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

killAchievementTracker

void killAchievementTracker(AchievementLibrary.Achievement A,
                            MOB mob)
Deletes the tracker for the given achievement, for the given mob.

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

rebuildAchievementTracker

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. It does not delete old achievements per se, just their trackers!

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

getXML

java.lang.String getXML()
Returns an XML representation of all the data in this object, for persistent storage.

Returns:
an XML representation of all the data in this object
See Also:
setXML(String)

setXML

void setXML(java.lang.String str)
Restores the data in this object from an XML document.

Parameters:
str - an XML representation of all the data in this object
See Also:
getXML()