|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultPlayerAccount
public class DefaultPlayerAccount
| 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 |
|---|
protected SHashSet<java.lang.String> friends
protected SHashSet<java.lang.String> ignored
protected SVector<java.lang.String> players
protected java.lang.String accountName
protected java.lang.String lastIP
protected long lastDateTime
protected long lastUpdated
protected java.lang.String email
protected java.lang.String password
protected java.lang.String notes
protected long accountExpiration
protected int bonusCommonSk
protected int bonusCraftSk
protected int bonusNonCraftSk
protected int bonusLanguages
protected int bonusCharStatPt
protected int bonusCharLimit
protected int bonusCharOnlineLimit
protected java.lang.String[] xtraValues
protected java.util.Set<PlayerAccount.AccountFlag> acctFlags
protected volatile MOB fakePlayerM
protected long[] prideExpireTime
protected int[][] prideStats
protected SVector<PlayerLibrary.ThinPlayer> thinPlayers
protected java.util.Map<java.lang.String,AchievementLibrary.Tracker> achievementers
protected CMUniqNameSortSVec<Tattoo> tattoos
protected static java.lang.String[] CODES
| Constructor Detail |
|---|
public DefaultPlayerAccount()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String name()
CMObject
name in interface CMObjectEnvironmental.Name()public CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic void copyInto(PlayerAccount otherAccount)
PlayerAccount
copyInto in interface PlayerAccountotherAccount - the data to copy from.public java.lang.String getLastIP()
AccountStats
getLastIP in interface AccountStatsAccountStats.setLastIP(String)public void setLastIP(java.lang.String ip)
AccountStats
setLastIP in interface AccountStatsip - the last IP address this player logged in from.AccountStats.getLastIP()public java.lang.String getEmail()
AccountStats
getEmail in interface AccountStatsAccountStats.setEmail(String)public void setEmail(java.lang.String newAdd)
AccountStats
setEmail in interface AccountStatsnewAdd - the players email address, if available.AccountStats.getEmail()public long getLastUpdated()
AccountStats
getLastUpdated in interface AccountStatsAccountStats.setLastUpdated(long)public void setLastUpdated(long time)
AccountStats
setLastUpdated in interface AccountStatstime - the time, in milis since 1970, that the player was last saved.AccountStats.getLastUpdated()public long getLastDateTime()
AccountStats
getLastDateTime in interface AccountStatsAccountStats.setLastDateTime(long)public void setLastDateTime(long C)
AccountStats
setLastDateTime in interface AccountStatsC - the time, in milis since 1970, that the player last logged off.AccountStats.getLastDateTime()public java.lang.String getPasswordStr()
AccountStats
getPasswordStr in interface AccountStatsAccountStats.setPassword(String),
AccountStats.matchesPassword(String)public void setPassword(java.lang.String newPassword)
AccountStats
setPassword in interface AccountStatsnewPassword - the players password.AccountStats.getPasswordStr(),
AccountStats.matchesPassword(String)public boolean matchesPassword(java.lang.String checkPass)
AccountStats
matchesPassword in interface AccountStatscheckPass - the password to compare reality to
AccountStats.setPassword(String),
AccountStats.getPasswordStr()public java.lang.String getNotes()
AccountStats
getNotes in interface AccountStatsAccountStats.setNotes(String)public void setNotes(java.lang.String newnotes)
AccountStats
setNotes in interface AccountStatsnewnotes - the administrative notes entered about this player.AccountStats.getNotes()protected SHashSet<java.lang.String> getHashFrom(java.lang.String str)
public java.util.Set<java.lang.String> getFriends()
AccountStats
getFriends in interface AccountStatspublic java.util.Set<java.lang.String> getIgnored()
AccountStats
getIgnored in interface AccountStatsAccountStats.isIgnored(String),
AccountStats.isIgnored(MOB)public boolean isIgnored(MOB mob)
AccountStats
isIgnored in interface AccountStatsmob - the mob to check
AccountStats.getIgnored(),
AccountStats.isIgnored(String)public boolean isIgnored(java.lang.String name)
AccountStats
isIgnored in interface AccountStatsname - the name to check
AccountStats.getIgnored(),
AccountStats.isIgnored(MOB)
public void bumpPrideStat(AccountStats.PrideStat stat,
int amt)
AccountStats
bumpPrideStat in interface AccountStatsstat - which pride stat to add toamt - the amount to addAccountStats.PrideStat
public int getPrideStat(TimeClock.TimePeriod period,
AccountStats.PrideStat stat)
AccountStats
getPrideStat in interface AccountStatsperiod - the time period to get the number forstat - which pride stat to get
AccountStats.PrideStatpublic MOB getAccountMob()
PlayerAccount
getAccountMob in interface PlayerAccountprotected java.lang.String getPrivateList(java.util.Set<java.lang.String> h)
public java.lang.String getXML()
AccountStats
getXML in interface AccountStatsAccountStats.setXML(String)public void setXML(java.lang.String str)
AccountStats
setXML in interface AccountStatsstr - an XML representation of all the data in this objectAccountStats.getXML()public long getAccountExpiration()
AccountStats
getAccountExpiration in interface AccountStatsAccountStats.setAccountExpiration(long)public void setAccountExpiration(long newVal)
AccountStats
setAccountExpiration in interface AccountStatsnewVal - the time, in milis, that this player expires.AccountStats.getAccountExpiration()public java.lang.String getAccountName()
PlayerAccount
getAccountName in interface PlayerAccountpublic void setAccountName(java.lang.String name)
PlayerAccount
setAccountName in interface PlayerAccountname - the accounts namepublic void addNewPlayer(MOB mob)
PlayerAccount
addNewPlayer in interface PlayerAccountmob - the new player to add.public java.lang.String findPlayer(java.lang.String name)
PlayerAccount
findPlayer in interface PlayerAccountname - the name look for check
public void delPlayer(java.lang.String name)
PlayerAccount
delPlayer in interface PlayerAccountname - the name of the player to remove.public void delPlayer(MOB mob)
PlayerAccount
delPlayer in interface PlayerAccountmob - the player to delete.public java.util.Enumeration<MOB> getLoadPlayers()
PlayerAccount
getLoadPlayers in interface PlayerAccountpublic java.util.Enumeration<PlayerLibrary.ThinPlayer> getThinPlayers()
PlayerAccount
getThinPlayers in interface PlayerAccountpublic java.util.Enumeration<java.lang.String> getPlayers()
PlayerAccount
getPlayers in interface PlayerAccountpublic void setPlayerNames(java.util.List<java.lang.String> names)
PlayerAccount
setPlayerNames in interface PlayerAccountnames - the names of the playerspublic int numPlayers()
PlayerAccount
numPlayers in interface PlayerAccountpublic boolean isSet(PlayerAccount.AccountFlag flag)
PlayerAccount
isSet in interface PlayerAccountflag - the flag name
PlayerAccount.setFlag(AccountFlag, boolean)
public void setFlag(PlayerAccount.AccountFlag flag,
boolean setOrUnset)
PlayerAccount
setFlag in interface PlayerAccountflag - the flag namesetOrUnset - true to set it, false to unsetPlayerAccount.isSet(AccountFlag)
public void killAchievementTracker(AchievementLibrary.Achievement A,
MOB mob)
AccountStats
killAchievementTracker in interface AccountStatsA - the achievement to kill the tracker formob - the mob to delete a tracker forAccountStats.rebuildAchievementTracker(MOB, String),
AchievementLibrary.Tracker,
AchievementLibrary.Achievement
public AchievementLibrary.Tracker getAchievementTracker(AchievementLibrary.Achievement A,
MOB mob)
AccountStats
getAchievementTracker in interface AccountStatsA - the achievement to get the tracker formob - the mob to create a tracker for
see #killAchievementTracker(Achievement, MOB),
AchievementLibrary.Tracker,
AchievementLibrary.Achievement
public void rebuildAchievementTracker(MOB mob,
java.lang.String achievementTattoo)
AccountStats
rebuildAchievementTracker in interface AccountStatsmob - the mob to modify the tracker for.achievementTattoo - the tattoo/id of the achievementAccountStats.getAchievementTracker(com.planet_ink.coffee_mud.Libraries.interfaces.AchievementLibrary.Achievement, MOB)public void addTattoo(java.lang.String of)
addTattoo in interface Tattooableof - the permanent tattoo name to addTattooable,
Tattooable.addTattoo(String, int),
Tattooable.addTattoo(Tattoo)
public void addTattoo(java.lang.String of,
int tickDown)
Tattooable
addTattoo in interface Tattooableof - the permanent tattoo name to addtickDown - the ticks of life for this tattooTattooable,
Tattooable.addTattoo(String),
Tattooable.addTattoo(Tattoo)public void delTattoo(java.lang.String of)
Tattooable
delTattoo in interface Tattooableof - the tattoo name of the tattoo to removeTattooable,
Tattooable.delTattoo(Tattoo)public void addTattoo(Tattoo of)
Tattooable
addTattoo in interface Tattooableof - the tattoo object to addTattooable,
Tattooable.addTattoo(String, int),
Tattooable.addTattoo(String)public void delTattoo(Tattoo of)
Tattooable
delTattoo in interface Tattooableof - the tattoo object to removeTattooable,
Tattooable.delTattoo(String)public java.util.Enumeration<Tattoo> tattoos()
Tattooable
tattoos in interface TattooableTattooablepublic Tattoo findTattoo(java.lang.String of)
Tattooable
findTattoo in interface Tattooableof - the marker name to return a tattoo for
Tattooable,
Tattooable.findTattooStartsWith(String)public Tattoo findTattooStartsWith(java.lang.String of)
Tattooable
findTattooStartsWith in interface Tattooableof - the marker name to return a tattoo starter for
Tattooable,
Tattooable.findTattoo(String)public int getBonusCharStatPoints()
AccountStats
getBonusCharStatPoints in interface AccountStatsAccountStats.setBonusCharStatPoints(int)public void setBonusCharStatPoints(int bonus)
AccountStats
setBonusCharStatPoints in interface AccountStatsbonus - the number of bonus charstat pointsAccountStats.getBonusCharStatPoints()public int getBonusCommonSkillLimits()
AccountStats
getBonusCommonSkillLimits in interface AccountStatsAccountStats.setBonusCommonSkillLimits(int)public void setBonusCommonSkillLimits(int bonus)
AccountStats
setBonusCommonSkillLimits in interface AccountStatsbonus - the number of bonus Common pointsAccountStats.getBonusCommonSkillLimits()public int getBonusCraftingSkillLimits()
AccountStats
getBonusCraftingSkillLimits in interface AccountStatsAccountStats.setBonusCraftingSkillLimits(int)public void setBonusCraftingSkillLimits(int bonus)
AccountStats
setBonusCraftingSkillLimits in interface AccountStatsbonus - the number of bonus Crafting pointsAccountStats.getBonusCraftingSkillLimits()public int getBonusNonCraftingSkillLimits()
AccountStats
getBonusNonCraftingSkillLimits in interface AccountStatsAccountStats.setBonusNonCraftingSkillLimits(int)public void setBonusNonCraftingSkillLimits(int bonus)
AccountStats
setBonusNonCraftingSkillLimits in interface AccountStatsbonus - the number of bonus Gathering pointsAccountStats.getBonusNonCraftingSkillLimits()public int getBonusLanguageLimits()
AccountStats
getBonusLanguageLimits in interface AccountStatsAccountStats.setBonusLanguageLimits(int)public void setBonusLanguageLimits(int bonus)
AccountStats
setBonusLanguageLimits in interface AccountStatsbonus - the number of bonus Language pointsAccountStats.getBonusLanguageLimits()public int getBonusCharsOnlineLimit()
PlayerAccount
getBonusCharsOnlineLimit in interface PlayerAccountPlayerAccount.setBonusCharsOnlineLimit(int)public void setBonusCharsOnlineLimit(int bonus)
PlayerAccount
setBonusCharsOnlineLimit in interface PlayerAccountbonus - the number of bonus chars onlinePlayerAccount.getBonusCharsOnlineLimit()public int getBonusCharsLimit()
PlayerAccount
getBonusCharsLimit in interface PlayerAccountPlayerAccount.setBonusCharsLimit(int)public void setBonusCharsLimit(int bonus)
PlayerAccount
setBonusCharsLimit in interface PlayerAccountbonus - the number of bonus charsPlayerAccount.getBonusCharsLimit()public java.lang.String getStat(java.lang.String code)
Modifiable
getStat in interface Modifiablecode - the name of the field to read.
Modifiable.getStatCodes()
public void setStat(java.lang.String code,
java.lang.String val)
Modifiable
setStat in interface Modifiablecode - the name of the field to setval - the value to set the field toModifiable.getStatCodes()public int getSaveStatIndex()
Modifiable
getSaveStatIndex in interface ModifiableModifiable.getStatCodes(),
Modifiable.getStat(String),
Modifiable.setStat(String, String)public java.lang.String[] getStatCodes()
Modifiable
getStatCodes in interface ModifiableModifiable.getStat(String),
Modifiable.setStat(String, String)public boolean isStat(java.lang.String code)
Modifiable
isStat in interface Modifiablecode - the name of the field to read.
Modifiable.getStatCodes()protected int getCodeNum(java.lang.String code)
public boolean sameAs(PlayerAccount E)
public int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||