CMObject
, Tickable
, CMLibrary
, PlayerLibrary
, java.lang.Cloneable
, java.lang.Comparable<CMObject>
public class CMPlayers extends StdLibrary implements PlayerLibrary
Modifier and Type | Class | Description |
---|---|---|
protected static class |
CMPlayers.AcctThinSortCode |
PlayerLibrary.PlayerCode, PlayerLibrary.PlayerSortCode, PlayerLibrary.ThinnerPlayer, PlayerLibrary.ThinPlayer
Modifier and Type | Field | Description |
---|---|---|
protected SVector<PlayerAccount> |
accountsList |
|
protected boolean |
allAccountsLoaded |
|
protected long[] |
autoPurgeDaysLevels |
|
protected int |
autoPurgeHash |
|
protected static java.util.Map<java.lang.String,PlayerLibrary.PlayerSortCode> |
charThinMap |
|
protected static java.util.List<Pair<java.lang.String,java.lang.Integer>> |
emptyPride |
|
protected PlayerLibrary[] |
playerLibList |
|
protected CrossRefTreeMap<MOB,Room> |
playerLocations |
|
protected SVector<MOB> |
playersList |
|
protected long[] |
prePurgeLevels |
|
protected static int |
PRIDE_TOP_SIZE |
|
protected java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] |
topAccounts |
|
protected java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] |
topPlayers |
|
protected long[] |
topPrideExpiration |
idConverter
isDebugging, name, serviceClient, tickStatus
STATUS_AFFECT, STATUS_ALIVE, STATUS_BEHAVIOR, STATUS_CLASS, STATUS_DEAD, STATUS_END, STATUS_FIGHT, STATUS_MISC, STATUS_MISC2, STATUS_MISC3, STATUS_MISC4, STATUS_MISC5, STATUS_MISC6, STATUS_MISC7, STATUS_NOT, STATUS_OTHER, STATUS_RACE, STATUS_REBIRTH, STATUS_SCRIPT, STATUS_START, STATUS_WEATHER, TICKID_AREA, TICKID_BALLISTICK, TICKID_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_ELECTRONICS, TICKID_EMAIL, TICKID_EVENT, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MISCELLANEOUS, TICKID_MOB, TICKID_PROPERTY_SPECIAL, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SHORTERMASK, TICKID_SOLITARYMASK, TICKID_SPECIALCOMBAT, TICKID_SPECIALMANEUVER, TICKID_SPELL_AFFECT, TICKID_SUPPORT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET
Constructor | Description |
---|---|
CMPlayers() |
Modifier and Type | Method | Description |
---|---|---|
boolean |
accountExists(java.lang.String name) |
Returns whether an account of the given name exists
in the database managed by this player lib.
|
boolean |
accountExistsAllHosts(java.lang.String name) |
Returns whether an account of the given name exists
in the database managed by this player lib.
|
java.util.Enumeration<PlayerAccount> |
accounts() |
Returns an enumeration of all player account objects
|
java.util.Enumeration<PlayerAccount> |
accounts(java.lang.String sort,
java.util.Map<java.lang.String,java.lang.Object> cache) |
Returns an enumeration of all account objects, with optional sort field,
and optional cache so that subsequent calls are faster.
|
boolean |
activate() |
Activates the library.
|
void |
addAccount(PlayerAccount acct) |
Adds a new account to this player manager, for
caching only.
|
void |
addPlayer(MOB newOne) |
Adds a reference to the given player char mob to this
manager cache.
|
protected void |
adjustTopPrideStats(java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] topWhat,
java.lang.String name,
AccountStats.PrideStat stat,
AccountStats astats) |
|
int |
bumpPrideStat(MOB mob,
AccountStats.PrideStat stat,
int amt) |
Given a player who did something that triggers a change in a pride stat, the pride
stat that changed, and the amount it changed by, this will update the pride lists
and return the given value.
|
void |
changePlayersLocation(MOB mob,
Room room) |
Sometimes the list of players in a given room needs to be
determined rather instantly.
|
void |
delPlayer(MOB oneToDel) |
Deletes a reference to a player character mob from the
cache.
|
MOB |
findPlayerOnline(java.lang.String srchStr,
boolean exactOnly) |
Given a player name, or substring for searching,
this will return a player character object that is presently
online and in the game.
|
PlayerAccount |
getAccount(java.lang.String calledThis) |
Returns null or an account of the given name if it
exists in the cache managed by this player lib.
|
PlayerAccount |
getAccountAllHosts(java.lang.String calledThis) |
Returns null or an account of the given name if it
exists in the cache managed by this player lib.
|
protected CMPlayers.AcctThinSortCode |
getAccountThinSortCode(java.lang.String codeName,
boolean loose) |
|
PlayerLibrary.PlayerSortCode |
getCharThinSortCode(java.lang.String codeName,
boolean loose) |
Given a possible sort code name, and now exact of a match you want,
this might return a player sort code match.
|
java.lang.String |
getLiegeOfUserAllHosts(java.lang.String userName) |
Given a player name, this will attempt to find the name of the
liege of this player, regardless of whether they've been cached
or not, and checking all user databases that share a map with
the caller.
|
PlayerAccount |
getLoadAccount(java.lang.String calledThis) |
Returns null or an account of the given name if it
exists in the database managed by this player lib.
|
PlayerAccount |
getLoadAccountByEmail(java.lang.String email) |
Returns null or an account of the given email addy if it
exists in the database managed by this player lib.
|
MOB |
getLoadPlayer(java.lang.String last) |
Finds a player character who has the given unique name,
first checking the manager cache, and if not found, goes
to the associated database and loads the character into
the cache and then returns it.
|
MOB |
getLoadPlayerAllHosts(java.lang.String last) |
Finds a player character who has the given unique name,
first checking the manager cache, and if not found, goes
to the associated database and loads the character into
the cache and then returns it.
|
MOB |
getLoadPlayerByEmail(java.lang.String email) |
Finds a player character who has the given email address
(possibly from their account), and loads that character
into the player manager cache and then returns it.
|
protected PlayerLibrary[] |
getOtherPlayerLibAllHosts() |
|
MOB |
getPlayer(java.lang.String calledThis) |
Given a player character name, this will search the list
of cached player mobs and return the one with that name.
|
MOB |
getPlayerAllHosts(java.lang.String calledThis) |
Given a player character name, this will search the list
of cached player mobs and return the one with that name.
|
java.util.List<java.lang.String> |
getPlayerLists() |
Returns a list of all player char names
in the database.
|
java.util.List<java.lang.String> |
getPlayerListsAllHosts() |
Returns a list of all player char names from all
databases connected to the same map as this
player manager.
|
java.util.Set<MOB> |
getPlayersHere(Room room) |
Sometimes the list of players in a given room needs to be
determined rather instantly.
|
java.lang.Object |
getPlayerValue(java.lang.String playerName,
PlayerLibrary.PlayerCode code) |
Given a player name, and code representing an attribute of the player
character, this will fetch the value on the player, regardless of
whether they are online or no.
|
java.lang.String |
getSortValue(MOB player,
PlayerLibrary.PlayerSortCode code) |
Given a player character mob, and a sort code, this will
return the sortable string value of that attribute,
|
protected PlayerLibrary.ThinPlayer |
getThinPlayer(MOB mob) |
|
PlayerLibrary.ThinPlayer |
getThinPlayer(java.lang.String mobName) |
Given a player name, this will construct a ThinPlayer
object if the player char is already cached, or
a new one from the database if not.
|
protected java.lang.String |
getThinSortValue(PlayerAccount account,
CMPlayers.AcctThinSortCode code) |
|
java.lang.Object |
getThinSortValue(PlayerLibrary.ThinPlayer player,
PlayerLibrary.PlayerSortCode code) |
Given a player character thinplayer obj, and a sort code, this will
return the sortable string value of that attribute,
|
java.util.List<Pair<java.lang.String,java.lang.Integer>> |
getTopPrideAccounts(TimeClock.TimePeriod period,
AccountStats.PrideStat stat) |
Returns the top winning account names and the associated values that got them there, for the given time
period and given pridestat.
|
java.util.List<Pair<java.lang.String,java.lang.Integer>> |
getTopPridePlayers(TimeClock.TimePeriod period,
AccountStats.PrideStat stat) |
Returns the top winning character names and the associated values that got them there, for the given time
period and given pridestat.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
boolean |
isLoadedPlayer(MOB M) |
Returns whether the given player char mob is currently
cached by this player manager.
|
boolean |
isLoadedPlayer(java.lang.String mobName) |
Returns whether the given player char name is currently
cached by this player manager.
|
boolean |
isSameAccount(MOB player1,
MOB player2) |
Given two player characters, this will return whether they either
share an account.
|
boolean |
isSameAccountIP(MOB player1,
MOB player2) |
Given two player characters, this will return whether they either
share an account, or the same ip address.
|
PlayerLibrary.ThinnerPlayer |
newThinnerPlayer() |
Factory method for a ThinnerPlayer object, so that
new features can be added in the future w/o having
to change many files.
|
int |
numPlayers() |
Returns the number of player character mobs currently
cached by this manager.
|
void |
obliterateAccountOnly(PlayerAccount deadAccount) |
Removes the given player account from the list of protected
names, and then deletes the account from the manager cache, from
the database, and from the world.
|
void |
obliteratePlayer(MOB deadMOB,
boolean deleteAssets,
boolean quiet) |
Obliterates a cached loaded player character from the
database, from the cache, from everything.
|
Pair<java.lang.Long,int[]>[] |
parsePrideStats(java.lang.String[] nextPeriods,
java.lang.String[] prideStats) |
Given an array of timestamps indexed by period ordinals, and previous
pride stat values similarly indexed, this will generate an array
of pairs representing the data.
|
boolean |
playerExists(java.lang.String name) |
Given a player name, this will attempt to find them and
return whether they actually exist regardless of whether
they've been cached or not.
|
boolean |
playerExistsAllHosts(java.lang.String name) |
Given a player name, this will attempt to find them and
return whether they actually exist regardless of whether
they've been cached or not, and checking all user
databases that share a map with the caller.
|
java.util.Enumeration<MOB> |
players() |
Returns an enumeration of all cached players in this
manager.
|
void |
renamePlayer(MOB mob,
java.lang.String oldName) |
Renaming a player is quite involved, as there are so many tables and
objects index by the players names.
|
void |
resetAllPrideStats() |
Causes the pride stats list to be reloaded from the
player database.
|
protected void |
saveLastMonthsTopsData(boolean debugTopThread) |
|
int |
savePlayers() |
Saves all cached players.
|
protected void |
selectRandomTitle(PlayerStats pStats) |
|
void |
setPlayerValue(java.lang.String playerName,
PlayerLibrary.PlayerCode code,
java.lang.Object value) |
Given a player name, and code representing an attribute of the player
character, and a new value appropriate to that code, this will change
the value on the player, regardless of whether they are online or no.
|
boolean |
shutdown() |
Shuts down the library.
|
java.util.Enumeration<PlayerLibrary.ThinPlayer> |
thinPlayers(java.lang.String sort,
java.util.Map<java.lang.String,java.lang.Object> cache) |
Given a possible player sort code string, and an optional cache of
pre-loaded key pairs, one of which might be "PLAYERLISTVECTOR"+sort,
pointing to a vector of pre-loaded thinplayers, this will return
an enumeration of all players in the game.
|
boolean |
tick(Tickable ticking,
int tickID) |
this is the method which is called periodically by the threading engine.
|
void |
unloadOfflinePlayer(MOB mob) |
Given a player char mob object, this will ensure that
the char is indeed not currently in the game and, if
so, remove them from the player cache without saving
them.
|
getServiceClient, L, propertiesLoaded
copyOf, initializeClass, name, newInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkDatabase, compareTo, copyOf, getServiceClient, getTickStatus, initializeClass, L, name, newInstance, propertiesLoaded, setThreadStatus
protected SVector<PlayerAccount> accountsList
protected boolean allAccountsLoaded
protected CrossRefTreeMap<MOB,Room> playerLocations
protected long[] autoPurgeDaysLevels
protected long[] prePurgeLevels
protected int autoPurgeHash
protected PlayerLibrary[] playerLibList
protected static final int PRIDE_TOP_SIZE
protected final long[] topPrideExpiration
protected final java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] topPlayers
protected final java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] topAccounts
protected static final java.util.List<Pair<java.lang.String,java.lang.Integer>> emptyPride
protected static final java.util.Map<java.lang.String,PlayerLibrary.PlayerSortCode> charThinMap
public java.lang.String ID()
CMObject
ID
in interface CMObject
ID
in class StdLibrary
public int numPlayers()
PlayerLibrary
numPlayers
in interface PlayerLibrary
PlayerLibrary.delPlayer(MOB)
,
PlayerLibrary.addPlayer(MOB)
,
PlayerLibrary.players()
public void addPlayer(MOB newOne)
PlayerLibrary
addPlayer
in interface PlayerLibrary
newOne
- the player mob to addPlayerLibrary.delPlayer(MOB)
,
PlayerLibrary.numPlayers()
,
PlayerLibrary.players()
public void delPlayer(MOB oneToDel)
PlayerLibrary
delPlayer
in interface PlayerLibrary
oneToDel
- the player char mob to remove from the cachePlayerLibrary.addPlayer(MOB)
,
PlayerLibrary.numPlayers()
,
PlayerLibrary.players()
public java.util.Set<MOB> getPlayersHere(Room room)
PlayerLibrary
getPlayersHere
in interface PlayerLibrary
room
- the room curious aboutPlayerLibrary.changePlayersLocation(MOB, Room)
public void changePlayersLocation(MOB mob, Room room)
PlayerLibrary
changePlayersLocation
in interface PlayerLibrary
mob
- the player to keep trackingroom
- the room the player is in, or null to remove him altogtherPlayerLibrary.getPlayersHere(Room)
public PlayerLibrary.ThinPlayer getThinPlayer(java.lang.String mobName)
PlayerLibrary
getThinPlayer
in interface PlayerLibrary
mobName
- the char namePlayerLibrary.ThinPlayer
,
PlayerLibrary.newThinnerPlayer()
,
PlayerLibrary.thinPlayers(String, Map)
protected PlayerLibrary.ThinPlayer getThinPlayer(MOB mob)
public MOB getLoadPlayerByEmail(java.lang.String email)
PlayerLibrary
getLoadPlayerByEmail
in interface PlayerLibrary
email
- email address to find a player forPlayerLibrary.getLoadPlayer(String)
,
PlayerLibrary.getLoadPlayerAllHosts(String)
public void unloadOfflinePlayer(MOB mob)
PlayerLibrary
unloadOfflinePlayer
in interface PlayerLibrary
mob
- the player char to unloadpublic boolean isSameAccount(MOB player1, MOB player2)
PlayerLibrary
isSameAccount
in interface PlayerLibrary
player1
- the first player mobplayer2
- the second player mobPlayerLibrary.isSameAccount(MOB, MOB)
,
PlayerLibrary.isSameAccountIP(MOB, MOB)
public boolean isSameAccountIP(MOB player1, MOB player2)
PlayerLibrary
isSameAccountIP
in interface PlayerLibrary
player1
- the first player mobplayer2
- the second player mobPlayerLibrary.isSameAccount(MOB, MOB)
,
PlayerLibrary.isSameAccountIP(MOB, MOB)
public PlayerAccount getLoadAccount(java.lang.String calledThis)
PlayerLibrary
getLoadAccount
in interface PlayerLibrary
calledThis
- the name of the accountPlayerLibrary.getLoadAccountByEmail(String)
public void addAccount(PlayerAccount acct)
PlayerLibrary
addAccount
in interface PlayerLibrary
acct
- the new accountpublic PlayerAccount getLoadAccountByEmail(java.lang.String email)
PlayerLibrary
getLoadAccountByEmail
in interface PlayerLibrary
email
- the email of the accountPlayerLibrary.getLoadAccount(String)
public PlayerAccount getAccount(java.lang.String calledThis)
PlayerLibrary
getAccount
in interface PlayerLibrary
calledThis
- the name of the accountPlayerLibrary.getAccountAllHosts(String)
protected PlayerLibrary[] getOtherPlayerLibAllHosts()
public PlayerAccount getAccountAllHosts(java.lang.String calledThis)
PlayerLibrary
getAccountAllHosts
in interface PlayerLibrary
calledThis
- the name of the accountPlayerLibrary.getAccount(String)
public java.util.List<java.lang.String> getPlayerLists()
PlayerLibrary
getPlayerLists
in interface PlayerLibrary
PlayerLibrary.getPlayerListsAllHosts()
public java.util.List<java.lang.String> getPlayerListsAllHosts()
PlayerLibrary
getPlayerListsAllHosts
in interface PlayerLibrary
PlayerLibrary.getPlayerLists()
public MOB getPlayer(java.lang.String calledThis)
PlayerLibrary
getPlayer
in interface PlayerLibrary
calledThis
- the cached player to getPlayerLibrary.getPlayerAllHosts(String)
public MOB getPlayerAllHosts(java.lang.String calledThis)
PlayerLibrary
getPlayerAllHosts
in interface PlayerLibrary
calledThis
- the cached player to getPlayerLibrary.getPlayer(String)
public MOB getLoadPlayerAllHosts(java.lang.String last)
PlayerLibrary
getLoadPlayerAllHosts
in interface PlayerLibrary
last
- the character namePlayerLibrary.getLoadPlayerByEmail(String)
,
PlayerLibrary.getLoadPlayer(String)
public MOB getLoadPlayer(java.lang.String last)
PlayerLibrary
getLoadPlayer
in interface PlayerLibrary
last
- the character namePlayerLibrary.getLoadPlayerByEmail(String)
,
PlayerLibrary.getLoadPlayerAllHosts(String)
public java.lang.String getLiegeOfUserAllHosts(java.lang.String userName)
PlayerLibrary
getLiegeOfUserAllHosts
in interface PlayerLibrary
userName
- the player char namepublic boolean accountExists(java.lang.String name)
PlayerLibrary
accountExists
in interface PlayerLibrary
name
- the name of the accountPlayerLibrary.accountExistsAllHosts(String)
public boolean accountExistsAllHosts(java.lang.String name)
PlayerLibrary
accountExistsAllHosts
in interface PlayerLibrary
name
- the name of the accountPlayerLibrary.accountExists(String)
public boolean isLoadedPlayer(MOB M)
PlayerLibrary
isLoadedPlayer
in interface PlayerLibrary
M
- the player charPlayerLibrary.isLoadedPlayer(String)
public boolean isLoadedPlayer(java.lang.String mobName)
PlayerLibrary
isLoadedPlayer
in interface PlayerLibrary
mobName
- the player char namePlayerLibrary.isLoadedPlayer(MOB)
public boolean playerExists(java.lang.String name)
PlayerLibrary
playerExists
in interface PlayerLibrary
name
- the player namePlayerLibrary.playerExistsAllHosts(String)
public boolean playerExistsAllHosts(java.lang.String name)
PlayerLibrary
playerExistsAllHosts
in interface PlayerLibrary
name
- the player namePlayerLibrary.playerExists(String)
public java.util.Enumeration<MOB> players()
PlayerLibrary
players
in interface PlayerLibrary
PlayerLibrary.delPlayer(MOB)
,
PlayerLibrary.addPlayer(MOB)
,
PlayerLibrary.numPlayers()
public java.util.Enumeration<PlayerAccount> accounts()
PlayerLibrary
accounts
in interface PlayerLibrary
PlayerLibrary.accounts(String, Map)
public java.util.List<Pair<java.lang.String,java.lang.Integer>> getTopPridePlayers(TimeClock.TimePeriod period, AccountStats.PrideStat stat)
PlayerLibrary
getTopPridePlayers
in interface PlayerLibrary
period
- the time period to get the top character forstat
- the pridestat to find winners for#see PlayerLibrary#bumpPrideStat(MOB, com.planet_ink.coffee_mud.Common.interfaces.AccountStats.PrideStat, int)
,
PlayerLibrary.parsePrideStats(String[], String[])
,
PlayerLibrary.resetAllPrideStats()
public java.util.List<Pair<java.lang.String,java.lang.Integer>> getTopPrideAccounts(TimeClock.TimePeriod period, AccountStats.PrideStat stat)
PlayerLibrary
getTopPrideAccounts
in interface PlayerLibrary
period
- the time period to get the top accounts forstat
- the pridestat to find winners for#see PlayerLibrary#bumpPrideStat(MOB, com.planet_ink.coffee_mud.Common.interfaces.AccountStats.PrideStat, int)
,
PlayerLibrary.parsePrideStats(String[], String[])
,
PlayerLibrary.resetAllPrideStats()
public int bumpPrideStat(MOB mob, AccountStats.PrideStat stat, int amt)
PlayerLibrary
bumpPrideStat
in interface PlayerLibrary
mob
- the player char who did somethingstat
- the pride stat reflecting what they didamt
- the amount to change the stat by + or -PlayerLibrary.getTopPrideAccounts(com.planet_ink.coffee_mud.Common.interfaces.TimeClock.TimePeriod, com.planet_ink.coffee_mud.Common.interfaces.AccountStats.PrideStat)
,
PlayerLibrary.getTopPridePlayers(com.planet_ink.coffee_mud.Common.interfaces.TimeClock.TimePeriod, com.planet_ink.coffee_mud.Common.interfaces.AccountStats.PrideStat)
,
PlayerLibrary.parsePrideStats(String[], String[])
,
PlayerLibrary.resetAllPrideStats()
protected void adjustTopPrideStats(java.util.List<Pair<java.lang.String,java.lang.Integer>>[][] topWhat, java.lang.String name, AccountStats.PrideStat stat, AccountStats astats)
public void renamePlayer(MOB mob, java.lang.String oldName)
PlayerLibrary
renamePlayer
in interface PlayerLibrary
mob
- the player char who has been renamedoldName
- the previous namepublic void obliteratePlayer(MOB deadMOB, boolean deleteAssets, boolean quiet)
PlayerLibrary
obliteratePlayer
in interface PlayerLibrary
deadMOB
- the player char mob objectdeleteAssets
- true to send retirement msg to the world and kill player dataquiet
- true to do this silently, false otherwisepublic void obliterateAccountOnly(PlayerAccount deadAccount)
PlayerLibrary
obliterateAccountOnly
in interface PlayerLibrary
deadAccount
- the account to obliteratepublic int savePlayers()
PlayerLibrary
savePlayers
in interface PlayerLibrary
public java.lang.String getSortValue(MOB player, PlayerLibrary.PlayerSortCode code)
PlayerLibrary
getSortValue
in interface PlayerLibrary
player
- the character mobcode
- the code for the value to returnPlayerLibrary.PlayerSortCode
,
PlayerLibrary.getThinSortValue(ThinPlayer, PlayerSortCode)
,
PlayerLibrary.getCharThinSortCode(String, boolean)
public java.lang.Object getThinSortValue(PlayerLibrary.ThinPlayer player, PlayerLibrary.PlayerSortCode code)
PlayerLibrary
getThinSortValue
in interface PlayerLibrary
player
- the character thinplayer objcode
- the code for the value to returnPlayerLibrary.PlayerSortCode
,
PlayerLibrary.ThinPlayer
,
PlayerLibrary.getSortValue(MOB, PlayerSortCode)
,
PlayerLibrary.getCharThinSortCode(String, boolean)
,
PlayerLibrary.getThinPlayer(String)
protected java.lang.String getThinSortValue(PlayerAccount account, CMPlayers.AcctThinSortCode code)
public PlayerLibrary.PlayerSortCode getCharThinSortCode(java.lang.String codeName, boolean loose)
PlayerLibrary
getCharThinSortCode
in interface PlayerLibrary
codeName
- the possible code nameloose
- true for startswith matches, false for exactPlayerLibrary.PlayerSortCode
,
PlayerLibrary.ThinPlayer
,
PlayerLibrary.getSortValue(MOB, PlayerSortCode)
,
PlayerLibrary.getThinSortValue(ThinPlayer, PlayerSortCode)
,
PlayerLibrary.getThinPlayer(String)
protected CMPlayers.AcctThinSortCode getAccountThinSortCode(java.lang.String codeName, boolean loose)
public java.util.Enumeration<PlayerLibrary.ThinPlayer> thinPlayers(java.lang.String sort, java.util.Map<java.lang.String,java.lang.Object> cache)
PlayerLibrary
thinPlayers
in interface PlayerLibrary
sort
- "", or a player sort code namecache
- null, or a map that might have a prior listPlayerLibrary.PlayerSortCode
,
PlayerLibrary.ThinPlayer
,
PlayerLibrary.getThinPlayer(String)
,
PlayerLibrary.newThinnerPlayer()
public Pair<java.lang.Long,int[]>[] parsePrideStats(java.lang.String[] nextPeriods, java.lang.String[] prideStats)
PlayerLibrary
parsePrideStats
in interface PlayerLibrary
nextPeriods
- the timestamps by periodprideStats
- the previous stat values by periodPlayerLibrary.getTopPrideAccounts(com.planet_ink.coffee_mud.Common.interfaces.TimeClock.TimePeriod, com.planet_ink.coffee_mud.Common.interfaces.AccountStats.PrideStat)
,
#see PlayerLibrary#bumpPrideStat(MOB, com.planet_ink.coffee_mud.Common.interfaces.AccountStats.PrideStat, int)
,
PlayerLibrary.resetAllPrideStats()
public MOB findPlayerOnline(java.lang.String srchStr, boolean exactOnly)
PlayerLibrary
findPlayerOnline
in interface PlayerLibrary
srchStr
- the name, or substring if Not exact onlyexactOnly
- true to only search full names, false for substringpublic PlayerLibrary.ThinnerPlayer newThinnerPlayer()
PlayerLibrary
newThinnerPlayer
in interface PlayerLibrary
PlayerLibrary.ThinnerPlayer
public java.util.Enumeration<PlayerAccount> accounts(java.lang.String sort, java.util.Map<java.lang.String,java.lang.Object> cache)
PlayerLibrary
accounts
in interface PlayerLibrary
sort
- null, or AcctThinSortCode namecache
- map that can contain a cashed enum vectorPlayerLibrary.accounts()
public void resetAllPrideStats()
PlayerLibrary
resetAllPrideStats
in interface PlayerLibrary
PlayerLibrary.getTopPrideAccounts(com.planet_ink.coffee_mud.Common.interfaces.TimeClock.TimePeriod, com.planet_ink.coffee_mud.Common.interfaces.AccountStats.PrideStat)
,
#see PlayerLibrary#bumpPrideStat(MOB, com.planet_ink.coffee_mud.Common.interfaces.AccountStats.PrideStat, int)
,
PlayerLibrary.parsePrideStats(String[], String[])
public java.lang.Object getPlayerValue(java.lang.String playerName, PlayerLibrary.PlayerCode code)
PlayerLibrary
getPlayerValue
in interface PlayerLibrary
playerName
- player character namecode
- PlayerCode to fetchPlayerLibrary.PlayerCode
,
PlayerLibrary.setPlayerValue(String, PlayerCode, Object)
public void setPlayerValue(java.lang.String playerName, PlayerLibrary.PlayerCode code, java.lang.Object value)
PlayerLibrary
setPlayerValue
in interface PlayerLibrary
playerName
- player character namecode
- PlayerCode to changevalue
- the new valuePlayerLibrary.PlayerCode
,
PlayerLibrary.getPlayerValue(String, PlayerCode)
public boolean activate()
CMLibrary
activate
in interface CMLibrary
activate
in class StdLibrary
CMLibrary.shutdown()
protected void saveLastMonthsTopsData(boolean debugTopThread)
protected void selectRandomTitle(PlayerStats pStats)
public boolean tick(Tickable ticking, int tickID)
Tickable
tick
in interface Tickable
tick
in class StdLibrary
ticking
- a reference to this Tickable objecttickID
- the TICKID_ constant describing this periodic call, as defined in TickableTickable
,
ServiceEngine
,
TickableGroup
public boolean shutdown()
CMLibrary
shutdown
in interface CMLibrary
shutdown
in class StdLibrary
CMLibrary.activate()