AccountStats, CMCommon, PlayerAccount, Achievable, CMObject, Modifiable, Tattooable, java.lang.Cloneable, java.lang.Comparable<CMObject>public class DefaultPlayerAccount extends java.lang.Object implements PlayerAccount
AccountStats.Agent, AccountStats.PrideStatPlayerAccount.AccountFlag| Modifier and Type | Field | Description |
|---|---|---|
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 static Filterer<Tattoo> |
expiringTattooFilter |
|
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 SHashSet<java.lang.String> |
subscriptions |
|
protected CMUniqNameSortListWrapper<Tattoo> |
tattoos |
|
protected SVector<PlayerLibrary.ThinPlayer> |
thinPlayers |
|
protected java.lang.String[] |
xtraValues |
idConverter| Constructor | Description |
|---|---|
DefaultPlayerAccount() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addNewPlayer(MOB mob) |
Adds a new player to this account.
|
void |
addTattoo(Tattoo of) |
Add a new tattoo to this object
|
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 |
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(Tattoo of) |
Remove a specific tattoo from this object
|
boolean |
delTattoo(java.lang.String 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,
Tattooable tracked,
MOB mob) |
Returns the tracker for the given achievement, for the given mob, for the given
tracked thing, 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,
boolean trim) |
|
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.Set<java.lang.String> |
getSubscriptions() |
Returns a modifiable Set that contains the set of journal
subscriptions, normalized to uppercase, that the player
has subscribed to and wishes to get notifications about.
|
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,
Tattooable tracked,
MOB mob) |
Deletes the tracker for the given achievement, for the given mob, for the given
tracked thing.
|
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(Tattooable tracked,
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.
|
protected SHashSet<java.lang.String> friends
protected SHashSet<java.lang.String> ignored
protected SHashSet<java.lang.String> subscriptions
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 CMUniqNameSortListWrapper<Tattoo> tattoos
protected static java.lang.String[] CODES
public java.lang.String ID()
CMObjectpublic java.lang.String name()
CMObjectname in interface CMObjectEnvironmental.Name()public CMObject newInstance()
CMObjectnewInstance in interface CMObjectpublic void initializeClass()
CMObjectinitializeClass in interface CMObjectpublic CMObject copyOf()
CMObjectpublic void copyInto(PlayerAccount otherAccount)
PlayerAccountcopyInto in interface PlayerAccountotherAccount - the data to copy from.public java.lang.String getLastIP()
AccountStatsgetLastIP in interface AccountStatsAccountStats.setLastIP(String)public void setLastIP(java.lang.String ip)
AccountStatssetLastIP in interface AccountStatsip - the last IP address this player logged in from.AccountStats.getLastIP()public java.lang.String getEmail()
AccountStatsgetEmail in interface AccountStatsAccountStats.setEmail(String)public void setEmail(java.lang.String newAdd)
AccountStatssetEmail in interface AccountStatsnewAdd - the players email address, if available.AccountStats.getEmail()public long getLastUpdated()
AccountStatsgetLastUpdated in interface AccountStatsAccountStats.setLastUpdated(long)public void setLastUpdated(long time)
AccountStatssetLastUpdated in interface AccountStatstime - the time, in milis since 1970, that the player was last saved.AccountStats.getLastUpdated()public long getLastDateTime()
AccountStatsgetLastDateTime in interface AccountStatsAccountStats.setLastDateTime(long)public void setLastDateTime(long C)
AccountStatssetLastDateTime in interface AccountStatsC - the time, in milis since 1970, that the player last logged off.AccountStats.getLastDateTime()public java.lang.String getPasswordStr()
AccountStatsgetPasswordStr in interface AccountStatsAccountStats.setPassword(String),
AccountStats.matchesPassword(String)public void setPassword(java.lang.String newPassword)
AccountStatssetPassword in interface AccountStatsnewPassword - the players password.AccountStats.getPasswordStr(),
AccountStats.matchesPassword(String)public boolean matchesPassword(java.lang.String checkPass)
AccountStatsmatchesPassword in interface AccountStatscheckPass - the password to compare reality toAccountStats.setPassword(String),
AccountStats.getPasswordStr()public java.lang.String getNotes()
AccountStatsgetNotes in interface AccountStatsAccountStats.setNotes(String)public void setNotes(java.lang.String newnotes)
AccountStatssetNotes in interface AccountStatsnewnotes - the administrative notes entered about this player.AccountStats.getNotes()protected SHashSet<java.lang.String> getHashFrom(java.lang.String str, boolean trim)
public java.util.Set<java.lang.String> getFriends()
AccountStatsgetFriends in interface AccountStatspublic java.util.Set<java.lang.String> getIgnored()
AccountStatsgetIgnored in interface AccountStatsAccountStats.isIgnored(String),
AccountStats.isIgnored(MOB)public java.util.Set<java.lang.String> getSubscriptions()
AccountStatsgetSubscriptions in interface AccountStatspublic boolean isIgnored(MOB mob)
AccountStatsisIgnored in interface AccountStatsmob - the mob to checkAccountStats.getIgnored(),
AccountStats.isIgnored(String)public boolean isIgnored(java.lang.String name)
AccountStatsisIgnored in interface AccountStatsname - the name to checkAccountStats.getIgnored(),
AccountStats.isIgnored(MOB)public void bumpPrideStat(AccountStats.PrideStat stat, int amt)
AccountStatsbumpPrideStat in interface AccountStatsstat - which pride stat to add toamt - the amount to addAccountStats.PrideStatpublic int getPrideStat(TimeClock.TimePeriod period, AccountStats.PrideStat stat)
AccountStatsgetPrideStat in interface AccountStatsperiod - the time period to get the number forstat - which pride stat to getAccountStats.PrideStatpublic MOB getAccountMob()
PlayerAccountgetAccountMob in interface PlayerAccountprotected java.lang.String getPrivateList(java.util.Set<java.lang.String> h)
public java.lang.String getXML()
AccountStatsgetXML in interface AccountStatsAccountStats.setXML(String)public void setXML(java.lang.String str)
AccountStatssetXML in interface AccountStatsstr - an XML representation of all the data in this objectAccountStats.getXML()public long getAccountExpiration()
AccountStatsgetAccountExpiration in interface AccountStatsAccountStats.setAccountExpiration(long)public void setAccountExpiration(long newVal)
AccountStatssetAccountExpiration in interface AccountStatsnewVal - the time, in milis, that this player expires.AccountStats.getAccountExpiration()public java.lang.String getAccountName()
PlayerAccountgetAccountName in interface PlayerAccountpublic void setAccountName(java.lang.String name)
PlayerAccountsetAccountName in interface PlayerAccountname - the accounts namepublic void addNewPlayer(MOB mob)
PlayerAccountaddNewPlayer in interface PlayerAccountmob - the new player to add.public java.lang.String findPlayer(java.lang.String name)
PlayerAccountfindPlayer in interface PlayerAccountname - the name look for checkpublic void delPlayer(java.lang.String name)
PlayerAccountdelPlayer in interface PlayerAccountname - the name of the player to remove.public void delPlayer(MOB mob)
PlayerAccountdelPlayer in interface PlayerAccountmob - the player to delete.public java.util.Enumeration<MOB> getLoadPlayers()
PlayerAccountgetLoadPlayers in interface PlayerAccountpublic java.util.Enumeration<PlayerLibrary.ThinPlayer> getThinPlayers()
PlayerAccountgetThinPlayers in interface PlayerAccountpublic java.util.Enumeration<java.lang.String> getPlayers()
PlayerAccountgetPlayers in interface PlayerAccountpublic void setPlayerNames(java.util.List<java.lang.String> names)
PlayerAccountsetPlayerNames in interface PlayerAccountnames - the names of the playerspublic int numPlayers()
PlayerAccountnumPlayers in interface PlayerAccountpublic boolean isSet(PlayerAccount.AccountFlag flag)
PlayerAccountisSet in interface PlayerAccountflag - the flag namePlayerAccount.setFlag(AccountFlag, boolean)public void setFlag(PlayerAccount.AccountFlag flag, boolean setOrUnset)
PlayerAccountsetFlag in interface PlayerAccountflag - the flag namesetOrUnset - true to set it, false to unsetPlayerAccount.isSet(AccountFlag)public void killAchievementTracker(AchievementLibrary.Achievement A, Tattooable tracked, MOB mob)
AchievablekillAchievementTracker in interface AchievableA - the achievement to kill the tracker fortracked - the mob or clan being trackedmob - the mob to delete a tracker forAchievable.rebuildAchievementTracker(Tattooable, MOB, String),
AchievementLibrary.Tracker,
AchievementLibrary.Achievementpublic AchievementLibrary.Tracker getAchievementTracker(AchievementLibrary.Achievement A, Tattooable tracked, MOB mob)
AchievablegetAchievementTracker in interface AchievableA - the achievement to get the tracker fortracked - the mob or clan being trackedmob - the mob to create a tracker for#see Achievable#killAchievementTracker(Achievement, MOB),
AchievementLibrary.Tracker,
AchievementLibrary.Achievementpublic void rebuildAchievementTracker(Tattooable tracked, MOB mob, java.lang.String achievementTattoo)
AchievablerebuildAchievementTracker in interface Achievabletracked - the mob or clan being trackedmob - the mob to modify the tracker for.achievementTattoo - the tattoo/id of the achievementAchievable.getAchievementTracker(com.planet_ink.coffee_mud.Libraries.interfaces.AchievementLibrary.Achievement, Tattooable, 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)
TattooableaddTattoo in interface Tattooableof - the permanent tattoo name to addtickDown - the ticks of life for this tattooTattooable,
Tattooable.addTattoo(String),
Tattooable.addTattoo(Tattoo)public boolean delTattoo(java.lang.String of)
TattooabledelTattoo in interface Tattooableof - the tattoo name of the tattoo to removeTattooable,
Tattooable.delTattoo(Tattoo)public void addTattoo(Tattoo of)
TattooableaddTattoo in interface Tattooableof - the tattoo object to addTattooable,
Tattooable.addTattoo(String, int),
Tattooable.addTattoo(String)public void delTattoo(Tattoo of)
TattooabledelTattoo in interface Tattooableof - the tattoo object to removeTattooable,
Tattooable.delTattoo(String)public java.util.Enumeration<Tattoo> tattoos()
Tattooabletattoos in interface TattooableTattooablepublic Tattoo findTattoo(java.lang.String of)
TattooablefindTattoo in interface Tattooableof - the marker name to return a tattoo forTattooable,
Tattooable.findTattooStartsWith(String)public Tattoo findTattooStartsWith(java.lang.String of)
TattooablefindTattooStartsWith in interface Tattooableof - the marker name to return a tattoo starter forTattooable,
Tattooable.findTattoo(String)public int getBonusCharStatPoints()
AccountStatsgetBonusCharStatPoints in interface AccountStatsAccountStats.setBonusCharStatPoints(int)public void setBonusCharStatPoints(int bonus)
AccountStatssetBonusCharStatPoints in interface AccountStatsbonus - the number of bonus charstat pointsAccountStats.getBonusCharStatPoints()public int getBonusCommonSkillLimits()
AccountStatsgetBonusCommonSkillLimits in interface AccountStatsAccountStats.setBonusCommonSkillLimits(int)public void setBonusCommonSkillLimits(int bonus)
AccountStatssetBonusCommonSkillLimits in interface AccountStatsbonus - the number of bonus Common pointsAccountStats.getBonusCommonSkillLimits()public int getBonusCraftingSkillLimits()
AccountStatsgetBonusCraftingSkillLimits in interface AccountStatsAccountStats.setBonusCraftingSkillLimits(int)public void setBonusCraftingSkillLimits(int bonus)
AccountStatssetBonusCraftingSkillLimits in interface AccountStatsbonus - the number of bonus Crafting pointsAccountStats.getBonusCraftingSkillLimits()public int getBonusNonCraftingSkillLimits()
AccountStatsgetBonusNonCraftingSkillLimits in interface AccountStatsAccountStats.setBonusNonCraftingSkillLimits(int)public void setBonusNonCraftingSkillLimits(int bonus)
AccountStatssetBonusNonCraftingSkillLimits in interface AccountStatsbonus - the number of bonus Gathering pointsAccountStats.getBonusNonCraftingSkillLimits()public int getBonusLanguageLimits()
AccountStatsgetBonusLanguageLimits in interface AccountStatsAccountStats.setBonusLanguageLimits(int)public void setBonusLanguageLimits(int bonus)
AccountStatssetBonusLanguageLimits in interface AccountStatsbonus - the number of bonus Language pointsAccountStats.getBonusLanguageLimits()public int getBonusCharsOnlineLimit()
PlayerAccountgetBonusCharsOnlineLimit in interface PlayerAccountPlayerAccount.setBonusCharsOnlineLimit(int)public void setBonusCharsOnlineLimit(int bonus)
PlayerAccountsetBonusCharsOnlineLimit in interface PlayerAccountbonus - the number of bonus chars onlinePlayerAccount.getBonusCharsOnlineLimit()public int getBonusCharsLimit()
PlayerAccountgetBonusCharsLimit in interface PlayerAccountPlayerAccount.setBonusCharsLimit(int)public void setBonusCharsLimit(int bonus)
PlayerAccountsetBonusCharsLimit in interface PlayerAccountbonus - the number of bonus charsPlayerAccount.getBonusCharsLimit()public java.lang.String getStat(java.lang.String code)
ModifiablegetStat in interface Modifiablecode - the name of the field to read.Modifiable.getStatCodes()public void setStat(java.lang.String code,
java.lang.String val)
ModifiablesetStat in interface Modifiablecode - the name of the field to setval - the value to set the field toModifiable.getStatCodes()public int getSaveStatIndex()
ModifiablegetSaveStatIndex in interface ModifiableModifiable.getStatCodes(),
Modifiable.getStat(String),
Modifiable.setStat(String, String)public java.lang.String[] getStatCodes()
ModifiablegetStatCodes in interface ModifiableModifiable.getStat(String),
Modifiable.setStat(String, String)public boolean isStat(java.lang.String code)
ModifiableisStat in interface Modifiablecode - the name of the field to read.Modifiable.getStatCodes()protected int getCodeNum(java.lang.String code)
public boolean sameAs(PlayerAccount E)