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.PrideStat
PlayerAccount.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()
CMObject
public java.lang.String name()
CMObject
name
in interface CMObject
Environmental.Name()
public CMObject newInstance()
CMObject
newInstance
in interface CMObject
public void initializeClass()
CMObject
initializeClass
in interface CMObject
public CMObject copyOf()
CMObject
public void copyInto(PlayerAccount otherAccount)
PlayerAccount
copyInto
in interface PlayerAccount
otherAccount
- the data to copy from.public java.lang.String getLastIP()
AccountStats
getLastIP
in interface AccountStats
AccountStats.setLastIP(String)
public void setLastIP(java.lang.String ip)
AccountStats
setLastIP
in interface AccountStats
ip
- the last IP address this player logged in from.AccountStats.getLastIP()
public java.lang.String getEmail()
AccountStats
getEmail
in interface AccountStats
AccountStats.setEmail(String)
public void setEmail(java.lang.String newAdd)
AccountStats
setEmail
in interface AccountStats
newAdd
- the players email address, if available.AccountStats.getEmail()
public long getLastUpdated()
AccountStats
getLastUpdated
in interface AccountStats
AccountStats.setLastUpdated(long)
public void setLastUpdated(long time)
AccountStats
setLastUpdated
in interface AccountStats
time
- the time, in milis since 1970, that the player was last saved.AccountStats.getLastUpdated()
public long getLastDateTime()
AccountStats
getLastDateTime
in interface AccountStats
AccountStats.setLastDateTime(long)
public void setLastDateTime(long C)
AccountStats
setLastDateTime
in interface AccountStats
C
- the time, in milis since 1970, that the player last logged off.AccountStats.getLastDateTime()
public java.lang.String getPasswordStr()
AccountStats
getPasswordStr
in interface AccountStats
AccountStats.setPassword(String)
,
AccountStats.matchesPassword(String)
public void setPassword(java.lang.String newPassword)
AccountStats
setPassword
in interface AccountStats
newPassword
- the players password.AccountStats.getPasswordStr()
,
AccountStats.matchesPassword(String)
public boolean matchesPassword(java.lang.String checkPass)
AccountStats
matchesPassword
in interface AccountStats
checkPass
- the password to compare reality toAccountStats.setPassword(String)
,
AccountStats.getPasswordStr()
public java.lang.String getNotes()
AccountStats
getNotes
in interface AccountStats
AccountStats.setNotes(String)
public void setNotes(java.lang.String newnotes)
AccountStats
setNotes
in interface AccountStats
newnotes
- 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()
AccountStats
getFriends
in interface AccountStats
public java.util.Set<java.lang.String> getIgnored()
AccountStats
getIgnored
in interface AccountStats
AccountStats.isIgnored(String)
,
AccountStats.isIgnored(MOB)
public java.util.Set<java.lang.String> getSubscriptions()
AccountStats
getSubscriptions
in interface AccountStats
public boolean isIgnored(MOB mob)
AccountStats
isIgnored
in interface AccountStats
mob
- the mob to checkAccountStats.getIgnored()
,
AccountStats.isIgnored(String)
public boolean isIgnored(java.lang.String name)
AccountStats
isIgnored
in interface AccountStats
name
- the name to checkAccountStats.getIgnored()
,
AccountStats.isIgnored(MOB)
public void bumpPrideStat(AccountStats.PrideStat stat, int amt)
AccountStats
bumpPrideStat
in interface AccountStats
stat
- which pride stat to add toamt
- the amount to addAccountStats.PrideStat
public int getPrideStat(TimeClock.TimePeriod period, AccountStats.PrideStat stat)
AccountStats
getPrideStat
in interface AccountStats
period
- the time period to get the number forstat
- which pride stat to getAccountStats.PrideStat
public MOB getAccountMob()
PlayerAccount
getAccountMob
in interface PlayerAccount
protected java.lang.String getPrivateList(java.util.Set<java.lang.String> h)
public java.lang.String getXML()
AccountStats
getXML
in interface AccountStats
AccountStats.setXML(String)
public void setXML(java.lang.String str)
AccountStats
setXML
in interface AccountStats
str
- an XML representation of all the data in this objectAccountStats.getXML()
public long getAccountExpiration()
AccountStats
getAccountExpiration
in interface AccountStats
AccountStats.setAccountExpiration(long)
public void setAccountExpiration(long newVal)
AccountStats
setAccountExpiration
in interface AccountStats
newVal
- the time, in milis, that this player expires.AccountStats.getAccountExpiration()
public java.lang.String getAccountName()
PlayerAccount
getAccountName
in interface PlayerAccount
public void setAccountName(java.lang.String name)
PlayerAccount
setAccountName
in interface PlayerAccount
name
- the accounts namepublic void addNewPlayer(MOB mob)
PlayerAccount
addNewPlayer
in interface PlayerAccount
mob
- the new player to add.public java.lang.String findPlayer(java.lang.String name)
PlayerAccount
findPlayer
in interface PlayerAccount
name
- the name look for checkpublic void delPlayer(java.lang.String name)
PlayerAccount
delPlayer
in interface PlayerAccount
name
- the name of the player to remove.public void delPlayer(MOB mob)
PlayerAccount
delPlayer
in interface PlayerAccount
mob
- the player to delete.public java.util.Enumeration<MOB> getLoadPlayers()
PlayerAccount
getLoadPlayers
in interface PlayerAccount
public java.util.Enumeration<PlayerLibrary.ThinPlayer> getThinPlayers()
PlayerAccount
getThinPlayers
in interface PlayerAccount
public java.util.Enumeration<java.lang.String> getPlayers()
PlayerAccount
getPlayers
in interface PlayerAccount
public void setPlayerNames(java.util.List<java.lang.String> names)
PlayerAccount
setPlayerNames
in interface PlayerAccount
names
- the names of the playerspublic int numPlayers()
PlayerAccount
numPlayers
in interface PlayerAccount
public boolean isSet(PlayerAccount.AccountFlag flag)
PlayerAccount
isSet
in interface PlayerAccount
flag
- the flag namePlayerAccount.setFlag(AccountFlag, boolean)
public void setFlag(PlayerAccount.AccountFlag flag, boolean setOrUnset)
PlayerAccount
setFlag
in interface PlayerAccount
flag
- the flag namesetOrUnset
- true to set it, false to unsetPlayerAccount.isSet(AccountFlag)
public void killAchievementTracker(AchievementLibrary.Achievement A, Tattooable tracked, MOB mob)
Achievable
killAchievementTracker
in interface Achievable
A
- 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.Achievement
public AchievementLibrary.Tracker getAchievementTracker(AchievementLibrary.Achievement A, Tattooable tracked, MOB mob)
Achievable
getAchievementTracker
in interface Achievable
A
- 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.Achievement
public void rebuildAchievementTracker(Tattooable tracked, MOB mob, java.lang.String achievementTattoo)
Achievable
rebuildAchievementTracker
in interface Achievable
tracked
- 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 Tattooable
of
- 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 Tattooable
of
- 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)
Tattooable
delTattoo
in interface Tattooable
of
- the tattoo name of the tattoo to removeTattooable
,
Tattooable.delTattoo(Tattoo)
public void addTattoo(Tattoo of)
Tattooable
addTattoo
in interface Tattooable
of
- the tattoo object to addTattooable
,
Tattooable.addTattoo(String, int)
,
Tattooable.addTattoo(String)
public void delTattoo(Tattoo of)
Tattooable
delTattoo
in interface Tattooable
of
- the tattoo object to removeTattooable
,
Tattooable.delTattoo(String)
public java.util.Enumeration<Tattoo> tattoos()
Tattooable
tattoos
in interface Tattooable
Tattooable
public Tattoo findTattoo(java.lang.String of)
Tattooable
findTattoo
in interface Tattooable
of
- the marker name to return a tattoo forTattooable
,
Tattooable.findTattooStartsWith(String)
public Tattoo findTattooStartsWith(java.lang.String of)
Tattooable
findTattooStartsWith
in interface Tattooable
of
- the marker name to return a tattoo starter forTattooable
,
Tattooable.findTattoo(String)
public int getBonusCharStatPoints()
AccountStats
getBonusCharStatPoints
in interface AccountStats
AccountStats.setBonusCharStatPoints(int)
public void setBonusCharStatPoints(int bonus)
AccountStats
setBonusCharStatPoints
in interface AccountStats
bonus
- the number of bonus charstat pointsAccountStats.getBonusCharStatPoints()
public int getBonusCommonSkillLimits()
AccountStats
getBonusCommonSkillLimits
in interface AccountStats
AccountStats.setBonusCommonSkillLimits(int)
public void setBonusCommonSkillLimits(int bonus)
AccountStats
setBonusCommonSkillLimits
in interface AccountStats
bonus
- the number of bonus Common pointsAccountStats.getBonusCommonSkillLimits()
public int getBonusCraftingSkillLimits()
AccountStats
getBonusCraftingSkillLimits
in interface AccountStats
AccountStats.setBonusCraftingSkillLimits(int)
public void setBonusCraftingSkillLimits(int bonus)
AccountStats
setBonusCraftingSkillLimits
in interface AccountStats
bonus
- the number of bonus Crafting pointsAccountStats.getBonusCraftingSkillLimits()
public int getBonusNonCraftingSkillLimits()
AccountStats
getBonusNonCraftingSkillLimits
in interface AccountStats
AccountStats.setBonusNonCraftingSkillLimits(int)
public void setBonusNonCraftingSkillLimits(int bonus)
AccountStats
setBonusNonCraftingSkillLimits
in interface AccountStats
bonus
- the number of bonus Gathering pointsAccountStats.getBonusNonCraftingSkillLimits()
public int getBonusLanguageLimits()
AccountStats
getBonusLanguageLimits
in interface AccountStats
AccountStats.setBonusLanguageLimits(int)
public void setBonusLanguageLimits(int bonus)
AccountStats
setBonusLanguageLimits
in interface AccountStats
bonus
- the number of bonus Language pointsAccountStats.getBonusLanguageLimits()
public int getBonusCharsOnlineLimit()
PlayerAccount
getBonusCharsOnlineLimit
in interface PlayerAccount
PlayerAccount.setBonusCharsOnlineLimit(int)
public void setBonusCharsOnlineLimit(int bonus)
PlayerAccount
setBonusCharsOnlineLimit
in interface PlayerAccount
bonus
- the number of bonus chars onlinePlayerAccount.getBonusCharsOnlineLimit()
public int getBonusCharsLimit()
PlayerAccount
getBonusCharsLimit
in interface PlayerAccount
PlayerAccount.setBonusCharsLimit(int)
public void setBonusCharsLimit(int bonus)
PlayerAccount
setBonusCharsLimit
in interface PlayerAccount
bonus
- the number of bonus charsPlayerAccount.getBonusCharsLimit()
public java.lang.String getStat(java.lang.String code)
Modifiable
getStat
in interface Modifiable
code
- the name of the field to read.Modifiable.getStatCodes()
public void setStat(java.lang.String code, java.lang.String val)
Modifiable
setStat
in interface Modifiable
code
- the name of the field to setval
- the value to set the field toModifiable.getStatCodes()
public int getSaveStatIndex()
Modifiable
getSaveStatIndex
in interface Modifiable
Modifiable.getStatCodes()
,
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public java.lang.String[] getStatCodes()
Modifiable
getStatCodes
in interface Modifiable
Modifiable.getStat(String)
,
Modifiable.setStat(String, String)
public boolean isStat(java.lang.String code)
Modifiable
isStat
in interface Modifiable
code
- the name of the field to read.Modifiable.getStatCodes()
protected int getCodeNum(java.lang.String code)
public boolean sameAs(PlayerAccount E)