|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ClanManager
This library manages the list of Clans in the game, and helps administer their most basic functions.
Clan| Method Summary | |
|---|---|
void |
addClan(Clan C)
Adds the given clan to the games list |
boolean |
checkClanPrivilege(MOB mob,
Clan.Function func)
Returns whether the given clan set contains a clan that allows the given mob to do the given function in the clan. |
boolean |
checkClanPrivilege(MOB mob,
java.lang.String clanID,
Clan.Function func)
Returns whether the given mob belongs to the given clan, and if so, whether they can do the given function in the clan. |
void |
clanAnnounce(MOB mob,
java.lang.String msg)
Makes an announcement to the clan announcement channel from the given mob. |
void |
clanAnnounceAll(java.lang.String msg)
Sends a message to the games official CLAN chat channel. |
java.lang.Iterable<Pair<Clan,java.lang.Integer>> |
clanRoles()
Returns all clans and their last-cached accept-positions The auto-positions may be inaccurate. |
java.util.Enumeration<Clan> |
clans()
Returns an enumeration of all the Clans in the game |
java.util.Enumeration<java.lang.String> |
clansNames()
Returns a list of all available clans names in the game, as Clan objects. |
java.util.Enumeration<java.lang.String> |
clansNamesAllHosts()
Returns a list of all available clan names for all clan managers that share a single map. |
ClanGovernment |
createGovernment(java.lang.String name)
Creates the new stock government |
ClanGovernment |
createSampleGovernment()
Creates, but does not add, a sample government object |
boolean |
findAnyClanRelations(MOB M1,
MOB M2,
int relation)
This method is used to determine the basic relationship between two mobs clans. |
Clan |
findClan(java.lang.String id)
Returns the Clan object associated with the given clan name, or if the name is not found, the name that most closely matches it. |
java.util.List<Triad<Clan,java.lang.Integer,java.lang.Integer>> |
findCommonRivalrousClans(MOB mob1,
MOB mob2)
Searches for all clans that can be rivalrous with other clans that are commonly shared between two mobs, along with their two roles |
Clan |
findConquerableClan(MOB mob)
Searches for a clan in the list that can be conquerable with other clans. |
Pair<Clan,java.lang.Integer> |
findPrivilegedClan(MOB mob,
Clan.Function func)
If the given mob belongs to a clan, and if they can do the given function in a clan, this will return that clan object and the integer. |
java.util.List<Pair<Clan,java.lang.Integer>> |
findPrivilegedClans(MOB mob,
Clan.Function func)
If the given mob belongs to a clan, and if they can do the given function in a clan, this will return those clan objects and their role integer. |
Clan |
findRivalrousClan(MOB mob)
Searches for a clan in the list that can be rivalrous with other clans. |
java.util.List<Pair<Clan,java.lang.Integer>> |
findRivalrousClans(MOB mob)
Searches for all clans that can be rivalrous with other clans. |
java.util.List<Pair<Clan,java.lang.Integer>> |
findRivalrousClans(MOB clanSourceMob,
MOB filterMob)
Returns a list of clans that the source mob belongs to which the filter mob does NOT also belong. |
void |
forceTick()
Force the clans maintenance thread |
Clan |
getClan(java.lang.String id)
Returns the Clan object associated with the given clan name |
Clan |
getClanAnyHost(java.lang.String id)
Returns the Clan object associated with the given clan name from any host sharing the same map as the caller. |
int |
getClanRelations(java.lang.String clanID1,
java.lang.String clanID2)
This method is used to determine the basic relationship between two clans. |
java.util.List<Pair<Clan,java.lang.Integer>> |
getClansByCategory(MOB M,
java.lang.String category)
Returns the list of clans this mob belongs to in the given category. |
java.lang.String |
getClanWebTemplateDir(java.lang.String webPath)
Returns the template vfs path associated with a given specific web path. |
ClanGovernment |
getDefaultGovernment()
Returns the default government definition object. |
java.lang.String |
getGovernmentHelp(MOB mob,
java.lang.String named,
boolean exact)
Returns help on the government type named, if it is available |
long |
getLastGovernmentLoad()
Get last time governments were loaded/updated |
ClanGovernment |
getStockGovernment(int typeid)
Returns a government definition object of the given internal stock clangovernments.xml id. |
ClanGovernment[] |
getStockGovernments()
Returns all government definition objects from internal stock clangovernments.xml file. |
Clan |
getWebPathClan(java.lang.String sitePath)
Returns the clan which may or may not be assigned to the absolute file path specified. |
Clan |
getWebPathClanMapping(java.lang.String webPath)
Returns the clan associated with a given specific web path. |
boolean |
goForward(MOB mob,
Clan C,
java.util.List<java.lang.String> commands,
Clan.Function function,
boolean voteIfNecessary)
Examines the given command string, which is based on the given clan function code. |
boolean |
isAnyCommonClan(MOB M1,
MOB M2)
Returns whether the two mobs share ANY common clans, even non-rivalrous ones. |
boolean |
isAtClanWar(MOB M1,
MOB M2)
This method is used to determine the basic relationship between two clan members. |
boolean |
isCommonClanRelations(java.lang.String clanName1,
java.lang.String clanName2,
int relation)
This method is used to determine the basic relationship between two clans. |
boolean |
isFamilyOfMembership(MOB M,
java.util.List<Clan.MemberRecord> members)
Returns whether the given MOB is a member of any of the families represented by the given list of clan members. |
java.lang.String |
makeGovernmentXML(ClanGovernment gvt)
Converts a given clan government object into xml. |
java.lang.String |
makeGovernmentXML(ClanGovernment[] gvts)
Converts a given clan government objects into xml. |
int |
numClans()
Returns the number of clans in the game. |
ClanGovernment[] |
parseGovernmentXML(java.lang.StringBuffer xml)
Converts xml into clan government objects. |
void |
removeClan(Clan C)
Removes the given clan from the games list |
boolean |
removeGovernment(ClanGovernment government)
Deletes the stock government.. |
void |
reSaveGovernmentsXML()
Forces the stock governments to be re-saved to clangovernments.xml. |
void |
tickAllClans()
Forces all clans to go through their maintenance process, which normally only occurs infrequently. |
java.lang.String |
translatePrize(Clan.Trophy trophy)
Returns a descriptive name for the given trophy code number. |
boolean |
trophySystemActive()
Returns whether this mud has activated its trophy system for clans. |
| Methods inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.CMLibrary |
|---|
activate, getServiceClient, L, propertiesLoaded, shutdown |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, ID, initializeClass, name, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
java.util.Enumeration<java.lang.String> clansNames()
Clanjava.util.Enumeration<java.lang.String> clansNamesAllHosts()
int numClans()
boolean isCommonClanRelations(java.lang.String clanName1,
java.lang.String clanName2,
int relation)
clanName1 - the first clan to evaluateclanName2 - the second clan to evaluaterelation - the clan relation to compare to
Clan.REL_DESCS
boolean isAtClanWar(MOB M1,
MOB M2)
M1 - the first mobs first rivalrous clan to evaluateM2 - the second mobs first rivalrous clan to evaluate
Clan.REL_DESCS
boolean isAnyCommonClan(MOB M1,
MOB M2)
M1 - first mobM2 - second mob
boolean findAnyClanRelations(MOB M1,
MOB M2,
int relation)
M1 - the first mob whose clans to evaluateM2 - the second mob whose clans to evaluaterelation - the relation to look for
Clan.REL_DESCS
int getClanRelations(java.lang.String clanID1,
java.lang.String clanID2)
clanID1 - the first clan to evaluateclanID2 - the second clan to evaluate
Clan.REL_DESCSlong getLastGovernmentLoad()
Clan getWebPathClan(java.lang.String sitePath)
sitePath - the absolute path of the web dir assigned to this clan
boolean checkClanPrivilege(MOB mob,
Clan.Function func)
mob - the mob to check the clans offunc - the function to check for
boolean checkClanPrivilege(MOB mob,
java.lang.String clanID,
Clan.Function func)
mob - the mob to look for privileges forclanID - the clanID to check for to check forfunc - the function to check for
Pair<Clan,java.lang.Integer> findPrivilegedClan(MOB mob,
Clan.Function func)
mob - the mob to check the clans offunc - the function to check for
java.util.List<Pair<Clan,java.lang.Integer>> findPrivilegedClans(MOB mob,
Clan.Function func)
mob - the mob to check the clans offunc - the function to check for
java.util.List<Pair<Clan,java.lang.Integer>> findRivalrousClans(MOB clanSourceMob,
MOB filterMob)
clanSourceMob - the mob to source the clan list fromfilterMob - the mob to use to filter out source clans
java.util.List<Triad<Clan,java.lang.Integer,java.lang.Integer>> findCommonRivalrousClans(MOB mob1,
MOB mob2)
mob1 - the first mob to check the clans ofmob2 - the second mob to check the clans of
Clan findRivalrousClan(MOB mob)
mob - the mob to check the clans of
Clan findConquerableClan(MOB mob)
mob - the mob to check the clans of
java.util.List<Pair<Clan,java.lang.Integer>> findRivalrousClans(MOB mob)
mob - the mob to check the clans of
Clan getClan(java.lang.String id)
id - the clan name
ClanClan getClanAnyHost(java.lang.String id)
id - the clan name
ClanClan findClan(java.lang.String id)
id - the clan name
Clanjava.util.Enumeration<Clan> clans()
java.lang.Iterable<Pair<Clan,java.lang.Integer>> clanRoles()
void addClan(Clan C)
C - the clan to addvoid removeClan(Clan C)
C - the clan to removeClan getWebPathClanMapping(java.lang.String webPath)
webPath - a full vfs resource path
java.lang.String getClanWebTemplateDir(java.lang.String webPath)
webPath - a full vfs resource path
void tickAllClans()
void clanAnnounceAll(java.lang.String msg)
msg - the message to sendjava.lang.String translatePrize(Clan.Trophy trophy)
trophy - the trophy code number
Clan.Trophyboolean trophySystemActive()
boolean isFamilyOfMembership(MOB M,
java.util.List<Clan.MemberRecord> members)
M - the mob to evaluatemembers - the members of a clan
java.util.List<Pair<Clan,java.lang.Integer>> getClansByCategory(MOB M,
java.lang.String category)
M - the mob to evaluatecategory - the clan goverment category
java.lang.String getGovernmentHelp(MOB mob,
java.lang.String named,
boolean exact)
mob - the viewer of the government typenamed - the possible name of the governmentexact - true to only match exact, or false otherwise
ClanGovernment getStockGovernment(int typeid)
typeid - the internal typeid
ClanGovernmentClanGovernment getDefaultGovernment()
ClanGovernmentClanGovernment createSampleGovernment()
ClanGovernment[] getStockGovernments()
ClanGovernmentjava.lang.String makeGovernmentXML(ClanGovernment gvt)
gvt - the clan government object
ClanGovernment,
makeGovernmentXML(com.planet_ink.coffee_mud.Common.interfaces.ClanGovernment[]),
parseGovernmentXML(StringBuffer)java.lang.String makeGovernmentXML(ClanGovernment[] gvts)
gvts - the clan government objects
ClanGovernment,
makeGovernmentXML(com.planet_ink.coffee_mud.Common.interfaces.ClanGovernment),
parseGovernmentXML(StringBuffer)ClanGovernment[] parseGovernmentXML(java.lang.StringBuffer xml)
xml - the xml
ClanGovernment,
makeGovernmentXML(com.planet_ink.coffee_mud.Common.interfaces.ClanGovernment),
makeGovernmentXML(com.planet_ink.coffee_mud.Common.interfaces.ClanGovernment[])void reSaveGovernmentsXML()
ClanGovernment createGovernment(java.lang.String name)
name - governmentname
boolean removeGovernment(ClanGovernment government)
government - the government to delete
void clanAnnounce(MOB mob,
java.lang.String msg)
mob - the mob who is announcing the messagemsg - string message to send to the clan info channels
boolean goForward(MOB mob,
Clan C,
java.util.List<java.lang.String> commands,
Clan.Function function,
boolean voteIfNecessary)
mob - the player who wants to perform the functionC - the clan that the player belongs tocommands - the command list describing the function that wants to be executedfunction - the function code described by the commands listvoteIfNecessary - true to start a vote if one is needed, false to just return true.
Clan.Function.ACCEPTvoid forceTick()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||