|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Libraries.StdLibrary
com.planet_ink.coffee_mud.Libraries.Clans
public class Clans
Portions Copyright (c) 2003 Jeremy Vyska
Portions Copyright (c) 2004-2011 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
| Field Summary | |
|---|---|
SHashtable<java.lang.String,Clan> |
all
|
long |
lastGovernmentLoad
|
| Constructor Summary | |
|---|---|
Clans()
|
|
| Method Summary | |
|---|---|
void |
addClan(Clan C)
Adds the given clan to the games list |
boolean |
authCheck(java.lang.String clanID,
int roleID,
Clan.Function function)
If the clan exists, it will check to see if the given role is allowed (or at least not disallowed) from the given clan function |
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.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. |
ClanGovernment |
createGovernment(java.lang.String name)
Creates the new stock government |
ClanGovernment |
createSampleGovernment()
Creates, but does not add, a sample government object |
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. |
Clan |
getClan(java.lang.String id)
Returns the Clan object associated with the given clan name |
int |
getClanRelations(java.lang.String clanName1,
java.lang.String clanName2)
This method is used to determine the basic relationship between two clans. |
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. |
boolean |
goForward(MOB mob,
Clan C,
java.util.Vector commands,
Clan.Function function,
boolean voteIfNecessary)
Examines the given command string, which is based on the given clan function code. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
protected java.lang.String |
indt(int x)
|
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. |
boolean |
shutdown()
|
void |
tickAllClans()
Forces all clans to go through their maintenance process, which normally only occurs infrequently. |
java.lang.String |
translatePrize(int 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 class com.planet_ink.coffee_mud.Libraries.StdLibrary |
|---|
activate, compareTo, copyOf, getSupportThread, initializeClass, newInstance, propertiesLoaded |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.planet_ink.coffee_mud.Libraries.interfaces.CMLibrary |
|---|
activate, getSupportThread, propertiesLoaded |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, initializeClass, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
public SHashtable<java.lang.String,Clan> all
public long lastGovernmentLoad
| Constructor Detail |
|---|
public Clans()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectID in class StdLibrarypublic boolean shutdown()
shutdown in interface CMLibraryshutdown in class StdLibrary
public boolean isCommonClanRelations(java.lang.String clanName1,
java.lang.String clanName2,
int relation)
ClanManager
isCommonClanRelations in interface ClanManagerclanName1 - the first clan to evaluateclanName2 - the second clan to evaluaterelation - the clan relation to compare to
Clan.REL_DESCS
public int getClanRelations(java.lang.String clanName1,
java.lang.String clanName2)
ClanManager
getClanRelations in interface ClanManagerclanName1 - the first clan to evaluateclanName2 - the second clan to evaluate
Clan.REL_DESCSpublic Clan getClan(java.lang.String id)
ClanManager
getClan in interface ClanManagerid - the clan name
Clanpublic Clan findClan(java.lang.String id)
ClanManager
findClan in interface ClanManagerClan
public boolean isFamilyOfMembership(MOB M,
java.util.List<Clan.MemberRecord> members)
ClanManager
isFamilyOfMembership in interface ClanManagerM - the mob to evaluatemembers - the members of a clan
public java.util.Enumeration<Clan> clans()
ClanManager
clans in interface ClanManagerpublic int numClans()
ClanManager
numClans in interface ClanManagerpublic void addClan(Clan C)
ClanManager
addClan in interface ClanManagerC - the clan to addpublic void removeClan(Clan C)
ClanManager
removeClan in interface ClanManagerC - the clan to removepublic void tickAllClans()
ClanManager
tickAllClans in interface ClanManagerpublic void clanAnnounceAll(java.lang.String msg)
ClanManager
clanAnnounceAll in interface ClanManagermsg - the message to sendpublic java.util.Enumeration<java.lang.String> clansNames()
ClanManager
clansNames in interface ClanManagerClanpublic java.lang.String translatePrize(int trophy)
ClanManager
translatePrize in interface ClanManagertrophy - the trophy code number
Clan.TROPHY_DESCSpublic boolean trophySystemActive()
ClanManager
trophySystemActive in interface ClanManager
public boolean goForward(MOB mob,
Clan C,
java.util.Vector commands,
Clan.Function function,
boolean voteIfNecessary)
ClanManager
goForward in interface ClanManagermob - 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.ACCEPTprotected java.lang.String indt(int x)
public long getLastGovernmentLoad()
ClanManager
getLastGovernmentLoad in interface ClanManager
public java.lang.String getGovernmentHelp(MOB mob,
java.lang.String named,
boolean exact)
ClanManager
getGovernmentHelp in interface ClanManagermob - the viewer of the government typenamed - the possible name of the governmentexact - true to only match exact, or false otherwise
public ClanGovernment createSampleGovernment()
ClanManager
createSampleGovernment in interface ClanManagerpublic void reSaveGovernmentsXML()
ClanManager
reSaveGovernmentsXML in interface ClanManagerpublic ClanGovernment createGovernment(java.lang.String name)
ClanManager
createGovernment in interface ClanManagername - governmentname
public boolean removeGovernment(ClanGovernment government)
ClanManager
removeGovernment in interface ClanManagergovernment - the government to deletepublic ClanGovernment[] getStockGovernments()
ClanManager
getStockGovernments in interface ClanManagerClanGovernmentpublic ClanGovernment getDefaultGovernment()
ClanManager
getDefaultGovernment in interface ClanManagerClanGovernmentpublic ClanGovernment getStockGovernment(int typeid)
ClanManager
getStockGovernment in interface ClanManagertypeid - the internal typeid
ClanGovernmentpublic java.lang.String makeGovernmentXML(ClanGovernment gvt)
ClanManager
makeGovernmentXML in interface ClanManagergvt - the clan government object
ClanGovernment,
ClanManager.makeGovernmentXML(com.planet_ink.coffee_mud.Common.interfaces.ClanGovernment[]),
ClanManager.parseGovernmentXML(StringBuffer)public java.lang.String makeGovernmentXML(ClanGovernment[] gvts)
ClanManager
makeGovernmentXML in interface ClanManagergvts - the clan government objects
ClanGovernment,
ClanManager.makeGovernmentXML(com.planet_ink.coffee_mud.Common.interfaces.ClanGovernment),
ClanManager.parseGovernmentXML(StringBuffer)public ClanGovernment[] parseGovernmentXML(java.lang.StringBuffer xml)
ClanManager
parseGovernmentXML in interface ClanManagerxml - the xml
ClanGovernment,
ClanManager.makeGovernmentXML(com.planet_ink.coffee_mud.Common.interfaces.ClanGovernment),
ClanManager.makeGovernmentXML(com.planet_ink.coffee_mud.Common.interfaces.ClanGovernment[])
public void clanAnnounce(MOB mob,
java.lang.String msg)
ClanManager
clanAnnounce in interface ClanManagermob - the mob who is announcing the messagemsg - string message to send to the clan info channels
public boolean authCheck(java.lang.String clanID,
int roleID,
Clan.Function function)
ClanManager
authCheck in interface ClanManagerclanID - the clan nameroleID - the clan roleIDfunction - the clan function
Clan
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||