com.planet_ink.coffee_mud.Common.interfaces
Interface Clan

All Superinterfaces:
java.lang.Cloneable, CMCommon, CMModifiable, CMObject, java.lang.Comparable<CMObject>, Tickable
All Known Implementing Classes:
DefaultClan

public interface Clan
extends java.lang.Cloneable, Tickable, CMCommon, CMModifiable


Nested Class Summary
static class Clan.ClanVote
          Represents an individual clan vote
 
Field Summary
static java.lang.String[] CLAN_STATS
          Stat variables associated with clan objects.
static int CLANSTATUS_ACTIVE
          constant for the Clan.getStatus() method, denoting normal status.
static java.lang.String[] CLANSTATUS_DESC
          constant descriptor strings for the Clan.CLANSTATUS_* constants, ordered by their value.
static int CLANSTATUS_FADING
          constant for the Clan.getStatus() method, denoting fading status.
static int CLANSTATUS_PENDING
          constant for the Clan.getStatus() method, denoting unapproved status.
static int FUNC_CLANACCEPT
          constant for the clan function of accepting new members.
static int FUNC_CLANASSIGN
          constant for the clan function of promoting or demoting members.
static int FUNC_CLANCANORDERCONQUERED
          constant for the clan function of ordering mobs in clan conquered areas.
static int FUNC_CLANCANORDERUNDERLINGS
          constant for the clan function of ordering lower ranked clan members.
static int FUNC_CLANDECLARE
          constant for the clan function of declaring war and peace .
static int FUNC_CLANDEPOSITLIST
          constant for the clan function of depositing and listing clan bank accounts.
static int FUNC_CLANDONATESET
          constant for the clan function of setting a new donation room.
static int FUNC_CLANENCHANT
          constant for the clan function of clanenchanting items.
static int FUNC_CLANEXILE
          constant for the clan function of exihiling members.
static int FUNC_CLANHOMESET
          constant for the clan function of setting a new clan home.
static int FUNC_CLANPREMISE
          constant for the clan function of writing a new clan premise.
static int FUNC_CLANPROPERTYOWNER
          constant for the clan function of acting as owner of clan property.
static int FUNC_CLANREJECT
          constant for the clan function of rejecting an applicant.
static int FUNC_CLANTAX
          constant for the clan function of changing the clans tax rate.
static int FUNC_CLANVOTEASSIGN
          constant for the clan function of voting on promotions.
static int FUNC_CLANVOTEOTHER
          constant for the clan function of voting on non-promotion questions .
static int FUNC_CLANWITHDRAW
          constant for the clan function of withdrawing from clan bank accounts.
static java.lang.String[][] FUNC_PROCEDURE
          chart of which roles can perform which functions for various clan types
static int GVT_DEMOCRACY
          constant for the getGovernment @see Clan#getGovernment() method.
static java.lang.String[] GVT_DESCS
          descriptor strings for the Clan.GVT_* constants, ordered by their value.
static int GVT_DICTATORSHIP
          constant for the getGovernment @see Clan#getGovernment() method.
static int GVT_FAMILY
          constant for the getGovernment @see Clan#getGovernment() method.
static int GVT_OLIGARCHY
          constant for the getGovernment @see Clan#getGovernment() method.
static int GVT_REPUBLIC
          constant for the getGovernment @see Clan#getGovernment() method.
static int GVT_THEOCRACY
          constant for the getGovernment @see Clan#getGovernment() method.
static int POS_APPLICANT
          Applicant constant for a clan members position.
static int POS_BOSS
          Boss constant for a clan members position.
static int POS_ENCHANTER
          Enchanter constant for a clan members position.
static int POS_LEADER
          Leader constant for a clan members position.
static int POS_MEMBER
          Normal member constant for a clan members position.
static int POS_STAFF
          Staff constant for a clan members position.
static int POS_TREASURER
          Treasurer constant for a clan members position.
static int[] POSORDER
          Numeric ordering for the Clan.POS_* constants, ordered by value.
static int REL_ALLY
          constant for Clan.getClanRelations method, denoting ally with.
static java.lang.String[] REL_DESCS
          descriptor strings for the Clan.REL_* constants, ordered by their value.
static int REL_FRIENDLY
          constant for Clan.getClanRelations method, denoting friendly to.
static int REL_HOSTILE
          constant for Clan.getClanRelations method, denoting hostile to.
static int REL_NEUTRAL
          constant for Clan.getClanRelations method, denoting neutral status towards.
static int[] REL_NEUTRALITYGAUGE
          constant used to determine something about clan relations
static java.lang.String[] REL_STATES
          long descriptor strings for the Clan.REL_* constants, ordered by their value.
static int REL_WAR
          constant for Clan.getClanRelations method, denoting at war with.
static int[][] RELATIONSHIP_VECTOR
          table used to determine how two clans are related when their declared relations differ.
static java.lang.String[][] ROL_DESCS
          descriptor table with x axis being Clan.POS_* constants, and y axis being Clan.GVT_* constants.
static int[][] ROL_MAX
          table w/x axis being Clan.POS_* constants, y axis being Clan.GVT_* constants, denotes max members of the ranks.
static int[] topRanks
          top ranks for each govt, ordered by the value of the Clan.GVT_* constants.
static int TROPHY_AREA
          constant for the Clan.getTrophies @see Clan#getTrophies() method.
static int TROPHY_CONTROL
          constant for the Clan.getTrophies @see Clan#getTrophies() method.
static java.lang.String[] TROPHY_DESCS
          long descriptor strings for the Clan.TROPHY_* constants, ordered by their value.
static java.lang.String[] TROPHY_DESCS_SHORT
          descriptor strings for the Clan.TROPHY_* constants, ordered by their value.
static int TROPHY_EXP
          constant for the Clan.getTrophies @see Clan#getTrophies() method.
static int TROPHY_PK
          constant for the Clan.getTrophies @see Clan#getTrophies() method.
static int TYPE_CLAN
          meaningless variable-- means this clan is a clan -- does not denote government, or anything else.
static java.lang.String[] VSTAT_DESCS
          Descriptors for the values of Clan.ClanVote.voteStatus member.
static int VSTAT_FAILED
          Vote has failed constant for the Clan.ClanVote.voteStatus member.
static int VSTAT_PASSED
          Vote has passed constant for the Clan.ClanVote.voteStatus member.
static int VSTAT_STARTED
          Vote just started constant for the Clan.ClanVote.voteStatus member.
 
Fields inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
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_CLAN, TICKID_CLANITEM, TICKID_DEADBODY_DECAY, TICKID_EMAIL, TICKID_EXIT_BEHAVIOR, TICKID_EXIT_REOPEN, TICKID_ITEM_BEHAVIOR, TICKID_ITEM_BOUNCEBACK, TICKID_LIGHT_FLICKERS, TICKID_LIVEAUCTION, TICKID_LONGERMASK, TICKID_MOB, TICKID_QUEST, TICKID_READYTOSTOP, TICKID_ROOM_BEHAVIOR, TICKID_ROOM_ITEM_REJUV, TICKID_SPELL_AFFECT, TICKID_TIMEAUCTION, TICKID_TRAP_DESTRUCTION, TICKID_TRAP_RESET, TICKMASK_SOLITARY, TICKS_PER_RLMIN, TIME_MILIS_PER_MUDHOUR, TIME_TICK, TIME_TICK_DOUBLE
 
Method Summary
 void addMember(MOB M, int role)
          Adds a new member to this clan
 void addVote(java.lang.Object CV)
          Adds a new ClanVote object to the list of ongoing votes for this clan.
 void adjExp(int howMuch)
          Adjusts the amount of experience earned by this clan.
 int allowedToDoThis(MOB mob, int function)
          Returns whether the given mob is allowed to perform the given function.
 int applyExpMods(int exp)
          Adjusts the amount of experience earned by a player based on the tax rate.
 long calculateMapPoints()
          Returns the total control points earned by this clan
 long calculateMapPoints(java.util.Vector controlledAreas)
          Returns the total control points represented by the list of controlled areas given.
 boolean canBeAssigned(MOB mob, int role)
           
 void clanAnnounce(java.lang.String msg)
          Sends a message to all members of all clans.
 java.lang.String clanID()
          Returns the unique identifying ID of the clan for reference elsewhere.
 void create()
          Orders the system to create this clan in the database.
 void delMember(MOB M)
          Del a member from this clan
 void delVote(java.lang.Object CV)
          Removes a new ClanVote object from the list of ongoing votes for this clan.
 void destroyClan()
          Orders the system to destroy this clan in the database.
 java.lang.String getAcceptanceSettings()
          Returns a mask used to identify whether a player is allowed to join a particular clan.
 int getAutoPosition()
          Returns whether membership is automatically approved to this clan.
 java.lang.String getClanClass()
          Retrieves this Clan's enforced character class.
 int getClanRelations(java.lang.String id)
          Returns a Clan.REL_* constant denoting the relationship between this clan and the clan of the given name.
 java.util.Vector getControlledAreas()
          Returns all the areas on the map controlled by this clan.
 int getCurrentClanKills()
          Returns the number of other-clan kills this clan has recorded.
 java.lang.String getDetail(MOB mob)
          Creates the string for the 'clandetail' command, based on the security of the given mob who will view the details.
 java.lang.String getDonation()
          Returns the roomID of this clans donation room
 long getExp()
          Gets the amount of experience earned by this clan.
 int getGovernment()
          Returns the Clan.GVT_* constant representing the government type of this clan.
 long getLastRelationChange(java.lang.String id)
          Returns the time/date stamp when this clan last changed its relations with the given clan.
 DVector getMemberList()
          Returns the set of members, where each row represents a member, and the columns are name, role, last login date
 DVector getMemberList(int PosFilter)
          Returns the set of members, where each row represents a member, and the columns are name, role, last login date.
 java.lang.String getMorgue()
          Returns the roomID of this clans morgue room
 java.lang.String getName()
          Returns the name of the clan, which is almost always the same as the ID, which is why clans can't change their names.
 int getNumVoters(int function)
          Returns the number of members allowed to vote on the given function.
 java.lang.String getPolitics()
          Returns an XML string used to identify the political relations between this clan and others.
 java.lang.String getPremise()
          Retrieves this Clan's basic story.
 java.lang.String getRecall()
          Returns the roomID of this clans recall room (their clan home)
 MOB getResponsibleMember()
          Returns the highest ranking member of this clan.
 int getSize()
          Returns the number of members of this clan.
 int getStatus()
          Returns one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out.
 double getTaxes()
          Gets the tax rate for this clan.
 int getTopRank(MOB mob)
          Returns the Clan.POS_* constant representing the highest rank in this clan type.
 int getTrophies()
          Returns a bitmap representing the trophies won by this clan.
 int getType()
          Returns the clan type, a meaningless variable.
 void recordClanKill()
          Called when a member of this clan kills a member of another clan.
 void setAcceptanceSettings(java.lang.String newSettings)
          Sets a mask used to identify whether a player is allowed to join a particular clan.
 void setAutoPosition(int pos)
          Sets whether membership is automatically approved to this clan.
 void setClanClass(java.lang.String newClass)
          Sets this Clan's enforced character class.
 void setClanRelations(java.lang.String id, int rel, long time)
          Sets a new relationship between this clan and the clan with the given id.
 void setDonation(java.lang.String newDonation)
          Sets the roomID of this clans donation room
 void setExp(long exp)
          Sets the amount of experience earned by this clan.
 void setGovernment(int type)
          Returns the Clan.GVT_* constant representing the government type of this clan.
 void setMorgue(java.lang.String newRecall)
          Sets the roomID of this clans morgue room
 void setName(java.lang.String newName)
          Sets a new name for this clan.
 void setPolitics(java.lang.String politics)
          Sets an XML string used to identify the political relations between this clan and others.
 void setPremise(java.lang.String newPremise)
          Sets this Clan's basic story.
 void setRecall(java.lang.String newRecall)
          Sets the roomID of this clans recall room (their clan home)
 void setStatus(int newStatus)
          Sets one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out.
 void setTaxes(double rate)
          Sets the tax rate for this clan.
 void setTrophies(int trophyFlag)
          Sets a bitmap representing the trophies won by this clan.
 java.lang.String typeName()
          Returns Clan, Republic, or another one of the clan government types defined by Clan.GVT_DESC
 void update()
          Orders the system to update this clan in the database.
 boolean updateClanPrivileges(MOB mob)
          This method is called when a given mobs clan status changes, for instance if they are added to the clan, removed from it, or change their rank.
 void updateVotes()
          Orders the system to save any changes to existing ongoing votes for this clan.
 java.util.Enumeration votes()
          If the clan type allows voting, this returns a series of Clan.ClanVote objects
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.Tickable
getTickStatus, name, tick
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject
copyOf, ID, initializeClass, newInstance
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMModifiable
getSaveStatIndex, getStat, getStatCodes, isStat, setStat
 

Field Detail

VSTAT_STARTED

static final int VSTAT_STARTED
Vote just started constant for the Clan.ClanVote.voteStatus member. @see Clan.ClanVote#voteStatus

See Also:
Constant Field Values

VSTAT_FAILED

static final int VSTAT_FAILED
Vote has failed constant for the Clan.ClanVote.voteStatus member. @see Clan.ClanVote#voteStatus

See Also:
Constant Field Values

VSTAT_PASSED

static final int VSTAT_PASSED
Vote has passed constant for the Clan.ClanVote.voteStatus member. @see Clan.ClanVote#voteStatus

See Also:
Constant Field Values

VSTAT_DESCS

static final java.lang.String[] VSTAT_DESCS
Descriptors for the values of Clan.ClanVote.voteStatus member. @see Clan.ClanVote#voteStatus


CLAN_STATS

static final java.lang.String[] CLAN_STATS
Stat variables associated with clan objects.


POS_APPLICANT

static final int POS_APPLICANT
Applicant constant for a clan members position.

See Also:
Constant Field Values

POS_MEMBER

static final int POS_MEMBER
Normal member constant for a clan members position.

See Also:
Constant Field Values

POS_STAFF

static final int POS_STAFF
Staff constant for a clan members position.

See Also:
Constant Field Values

POS_ENCHANTER

static final int POS_ENCHANTER
Enchanter constant for a clan members position.

See Also:
Constant Field Values

POS_TREASURER

static final int POS_TREASURER
Treasurer constant for a clan members position.

See Also:
Constant Field Values

POS_LEADER

static final int POS_LEADER
Leader constant for a clan members position.

See Also:
Constant Field Values

POS_BOSS

static final int POS_BOSS
Boss constant for a clan members position.

See Also:
Constant Field Values

POSORDER

static final int[] POSORDER
Numeric ordering for the Clan.POS_* constants, ordered by value. @see Clan


CLANSTATUS_ACTIVE

static final int CLANSTATUS_ACTIVE
constant for the Clan.getStatus() method, denoting normal status. @see Clan#getStatus() .

See Also:
Constant Field Values

CLANSTATUS_PENDING

static final int CLANSTATUS_PENDING
constant for the Clan.getStatus() method, denoting unapproved status. @see Clan#getStatus() .

See Also:
Constant Field Values

CLANSTATUS_FADING

static final int CLANSTATUS_FADING
constant for the Clan.getStatus() method, denoting fading status. @see Clan#getStatus() .

See Also:
Constant Field Values

CLANSTATUS_DESC

static final java.lang.String[] CLANSTATUS_DESC
constant descriptor strings for the Clan.CLANSTATUS_* constants, ordered by their value. @see Clan .


REL_NEUTRAL

static final int REL_NEUTRAL
constant for Clan.getClanRelations method, denoting neutral status towards. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_WAR

static final int REL_WAR
constant for Clan.getClanRelations method, denoting at war with. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_HOSTILE

static final int REL_HOSTILE
constant for Clan.getClanRelations method, denoting hostile to. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_FRIENDLY

static final int REL_FRIENDLY
constant for Clan.getClanRelations method, denoting friendly to. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_ALLY

static final int REL_ALLY
constant for Clan.getClanRelations method, denoting ally with. @see Clan#getClanRelations(String)

See Also:
Constant Field Values

REL_NEUTRALITYGAUGE

static final int[] REL_NEUTRALITYGAUGE
constant used to determine something about clan relations


RELATIONSHIP_VECTOR

static final int[][] RELATIONSHIP_VECTOR
table used to determine how two clans are related when their declared relations differ. both axis are Clan.REL_* constants. @see Clan


REL_DESCS

static final java.lang.String[] REL_DESCS
descriptor strings for the Clan.REL_* constants, ordered by their value. @see Clan


REL_STATES

static final java.lang.String[] REL_STATES
long descriptor strings for the Clan.REL_* constants, ordered by their value. @see Clan


TROPHY_CONTROL

static final int TROPHY_CONTROL
constant for the Clan.getTrophies @see Clan#getTrophies() method. Denotes control points.

See Also:
Constant Field Values

TROPHY_EXP

static final int TROPHY_EXP
constant for the Clan.getTrophies @see Clan#getTrophies() method. Denotes exp.

See Also:
Constant Field Values

TROPHY_AREA

static final int TROPHY_AREA
constant for the Clan.getTrophies @see Clan#getTrophies() method. Denotes most areas.

See Also:
Constant Field Values

TROPHY_PK

static final int TROPHY_PK
constant for the Clan.getTrophies @see Clan#getTrophies() method. Denotes most pkills.

See Also:
Constant Field Values

TROPHY_DESCS_SHORT

static final java.lang.String[] TROPHY_DESCS_SHORT
descriptor strings for the Clan.TROPHY_* constants, ordered by their value. @see Clan


TROPHY_DESCS

static final java.lang.String[] TROPHY_DESCS
long descriptor strings for the Clan.TROPHY_* constants, ordered by their value. @see Clan


GVT_DICTATORSHIP

static final int GVT_DICTATORSHIP
constant for the getGovernment @see Clan#getGovernment() method. Denotes Clan.

See Also:
Constant Field Values

GVT_OLIGARCHY

static final int GVT_OLIGARCHY
constant for the getGovernment @see Clan#getGovernment() method. Denotes Guild.

See Also:
Constant Field Values

GVT_REPUBLIC

static final int GVT_REPUBLIC
constant for the getGovernment @see Clan#getGovernment() method. Denotes Republic.

See Also:
Constant Field Values

GVT_DEMOCRACY

static final int GVT_DEMOCRACY
constant for the getGovernment @see Clan#getGovernment() method. Denotes Democracy.

See Also:
Constant Field Values

GVT_THEOCRACY

static final int GVT_THEOCRACY
constant for the getGovernment @see Clan#getGovernment() method. Denotes Theocracy.

See Also:
Constant Field Values

GVT_FAMILY

static final int GVT_FAMILY
constant for the getGovernment @see Clan#getGovernment() method. Denotes Family.

See Also:
Constant Field Values

GVT_DESCS

static final java.lang.String[] GVT_DESCS
descriptor strings for the Clan.GVT_* constants, ordered by their value. @see Clan


topRanks

static final int[] topRanks
top ranks for each govt, ordered by the value of the Clan.GVT_* constants. @see Clan


ROL_DESCS

static final java.lang.String[][] ROL_DESCS
descriptor table with x axis being Clan.POS_* constants, and y axis being Clan.GVT_* constants. @see Clan


ROL_MAX

static final int[][] ROL_MAX
table w/x axis being Clan.POS_* constants, y axis being Clan.GVT_* constants, denotes max members of the ranks.


TYPE_CLAN

static final int TYPE_CLAN
meaningless variable-- means this clan is a clan -- does not denote government, or anything else.

See Also:
Constant Field Values

FUNC_PROCEDURE

static final java.lang.String[][] FUNC_PROCEDURE
chart of which roles can perform which functions for various clan types


FUNC_CLANACCEPT

static final int FUNC_CLANACCEPT
constant for the clan function of accepting new members. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANASSIGN

static final int FUNC_CLANASSIGN
constant for the clan function of promoting or demoting members. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANEXILE

static final int FUNC_CLANEXILE
constant for the clan function of exihiling members. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANHOMESET

static final int FUNC_CLANHOMESET
constant for the clan function of setting a new clan home. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANDONATESET

static final int FUNC_CLANDONATESET
constant for the clan function of setting a new donation room. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANREJECT

static final int FUNC_CLANREJECT
constant for the clan function of rejecting an applicant. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANPREMISE

static final int FUNC_CLANPREMISE
constant for the clan function of writing a new clan premise. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANPROPERTYOWNER

static final int FUNC_CLANPROPERTYOWNER
constant for the clan function of acting as owner of clan property. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANWITHDRAW

static final int FUNC_CLANWITHDRAW
constant for the clan function of withdrawing from clan bank accounts. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANCANORDERUNDERLINGS

static final int FUNC_CLANCANORDERUNDERLINGS
constant for the clan function of ordering lower ranked clan members. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANCANORDERCONQUERED

static final int FUNC_CLANCANORDERCONQUERED
constant for the clan function of ordering mobs in clan conquered areas. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANVOTEASSIGN

static final int FUNC_CLANVOTEASSIGN
constant for the clan function of voting on promotions. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANVOTEOTHER

static final int FUNC_CLANVOTEOTHER
constant for the clan function of voting on non-promotion questions . @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANDEPOSITLIST

static final int FUNC_CLANDEPOSITLIST
constant for the clan function of depositing and listing clan bank accounts. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANDECLARE

static final int FUNC_CLANDECLARE
constant for the clan function of declaring war and peace . @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANTAX

static final int FUNC_CLANTAX
constant for the clan function of changing the clans tax rate. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values

FUNC_CLANENCHANT

static final int FUNC_CLANENCHANT
constant for the clan function of clanenchanting items. @see Clan#allowedToDoThis(MOB, int)

See Also:
Constant Field Values
Method Detail

allowedToDoThis

int allowedToDoThis(MOB mob,
                    int function)
Returns whether the given mob is allowed to perform the given function. The return value can designate that they may do it now, that they may not do it, or that it requires a vote. A return value 1 means they can do it now, 0 means it requires a vote, and -1 means they can never do it. The functions are defined in the Clan interface as FUNC_* constants.

Parameters:
mob - the mob whose priviledges to check.
function - the Clan.FUNC_* constant to use
Returns:
either 1, 0, or -1 saying if they are allowed.
See Also:
Clan

clanAnnounce

void clanAnnounce(java.lang.String msg)
Sends a message to all members of all clans.

Parameters:
msg - the message to send

votes

java.util.Enumeration votes()
If the clan type allows voting, this returns a series of Clan.ClanVote objects

Returns:
the set of clan votes
See Also:
Clan.ClanVote

updateVotes

void updateVotes()
Orders the system to save any changes to existing ongoing votes for this clan.


addVote

void addVote(java.lang.Object CV)
Adds a new ClanVote object to the list of ongoing votes for this clan.

Parameters:
CV - the clanvote object to add
See Also:
Clan.ClanVote

delVote

void delVote(java.lang.Object CV)
Removes a new ClanVote object from the list of ongoing votes for this clan.

Parameters:
CV - the clanvote object to remove
See Also:
Clan.ClanVote

getNumVoters

int getNumVoters(int function)
Returns the number of members allowed to vote on the given function. The function is one of the Clan.FUNC_* constants.

Parameters:
function - the FUNC_* constant
Returns:
the number of members of this clan who can vote on it
See Also:
Clan

getSize

int getSize()
Returns the number of members of this clan.

Returns:
the membership count.

getName

java.lang.String getName()
Returns the name of the clan, which is almost always the same as the ID, which is why clans can't change their names.

Returns:
the name of the clan.
See Also:
setName(String)

clanID

java.lang.String clanID()
Returns the unique identifying ID of the clan for reference elsewhere.

Returns:
the unique identifier of the clan.
See Also:
getName()

setName

void setName(java.lang.String newName)
Sets a new name for this clan.

Parameters:
newName - the new name of this clan
See Also:
getName(), clanID()

getType

int getType()
Returns the clan type, a meaningless variable.

Returns:
always returns TYPE_CLAN

typeName

java.lang.String typeName()
Returns Clan, Republic, or another one of the clan government types defined by Clan.GVT_DESC

Returns:
the clans government types
See Also:
Clan

updateClanPrivileges

boolean updateClanPrivileges(MOB mob)
This method is called when a given mobs clan status changes, for instance if they are added to the clan, removed from it, or change their rank.

Parameters:
mob - the mob whose status needs updating
Returns:
whether the update succeeded

getPremise

java.lang.String getPremise()
Retrieves this Clan's basic story. This is to make the Clan's more RP based and so we can provide up-to-date information on Clans on the web server.

Returns:
the story of this clan
See Also:
setPremise(String)

setPremise

void setPremise(java.lang.String newPremise)
Sets this Clan's basic story.

See Also:
getPremise()

setClanClass

void setClanClass(java.lang.String newClass)
Sets this Clan's enforced character class.

See Also:
getClanClass()

getClanClass

java.lang.String getClanClass()
Retrieves this Clan's enforced character class. All players who join this clan become this class.

Returns:
the class of this clan
See Also:
setClanClass(String)

getDetail

java.lang.String getDetail(MOB mob)
Creates the string for the 'clandetail' command, based on the security of the given mob who will view the details.

Parameters:
mob - the one who will view the details
Returns:
the details view of this clan for the given mob

getAcceptanceSettings

java.lang.String getAcceptanceSettings()
Returns a mask used to identify whether a player is allowed to join a particular clan.

Returns:
the mask used to identify prospects
See Also:
MaskingLibrary, setAcceptanceSettings(String)

setAcceptanceSettings

void setAcceptanceSettings(java.lang.String newSettings)
Sets a mask used to identify whether a player is allowed to join a particular clan.

Parameters:
newSettings - the mask used to identify prospects
See Also:
MaskingLibrary, getAcceptanceSettings()

getPolitics

java.lang.String getPolitics()
Returns an XML string used to identify the political relations between this clan and others.

Returns:
xml document describing the politics of this clan
See Also:
setPolitics(String)

setPolitics

void setPolitics(java.lang.String politics)
Sets an XML string used to identify the political relations between this clan and others.

Parameters:
politics - xml document describing the politics of this clan
See Also:
getPolitics()

getAutoPosition

int getAutoPosition()
Returns whether membership is automatically approved to this clan. And if so, what the default position for members are.

Returns:
xml document describing the politics of this clan
See Also:
setAutoPosition(int)

setAutoPosition

void setAutoPosition(int pos)
Sets whether membership is automatically approved to this clan. And if so, what the default position for members are.

Parameters:
pos - the positition to give to applicants
See Also:
getAutoPosition()

getStatus

int getStatus()
Returns one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out.

Returns:
a Clan.CLANSTAT_* constant
See Also:
Clan, setStatus(int)

setStatus

void setStatus(int newStatus)
Sets one of the CLANSTAT_* constants describing the pending status of this clan for acceptable, or whether its one its way out.

Parameters:
newStatus - a Clan.CLANSTAT_* constant
See Also:
Clan, getStatus()

getRecall

java.lang.String getRecall()
Returns the roomID of this clans recall room (their clan home)

Returns:
the roomid of this clans clan home
See Also:
setRecall(String)

setRecall

void setRecall(java.lang.String newRecall)
Sets the roomID of this clans recall room (their clan home)

Parameters:
newRecall - the roomid of this clans clan home
See Also:
getRecall()

getMorgue

java.lang.String getMorgue()
Returns the roomID of this clans morgue room

Returns:
the roomID of this clans morgue room
See Also:
setMorgue(String)

setMorgue

void setMorgue(java.lang.String newRecall)
Sets the roomID of this clans morgue room

Parameters:
newRecall - the roomID of this clans morgue room
See Also:
getMorgue()

getTrophies

int getTrophies()
Returns a bitmap representing the trophies won by this clan. The bitmap is made up of Clan.TROPHY_* constants.

Returns:
a bitmap of the trophies
See Also:
Clan, setTrophies(int)

setTrophies

void setTrophies(int trophyFlag)
Sets a bitmap representing the trophies won by this clan. The bitmap is made up of Clan.TROPHY_* constants.

Parameters:
trophyFlag - a bitmap of the trophies
See Also:
Clan, getTrophies()

getDonation

java.lang.String getDonation()
Returns the roomID of this clans donation room

Returns:
the roomID of this clans donation room
See Also:
setDonation(String)

setDonation

void setDonation(java.lang.String newDonation)
Sets the roomID of this clans donation room

Parameters:
newDonation - the roomID of this clans donation room
See Also:
getDonation()

getExp

long getExp()
Gets the amount of experience earned by this clan.

Returns:
the experience earned

setExp

void setExp(long exp)
Sets the amount of experience earned by this clan.

Parameters:
exp - the experience earned

adjExp

void adjExp(int howMuch)
Adjusts the amount of experience earned by this clan.

Parameters:
howMuch - the experience adjustment, + or -

applyExpMods

int applyExpMods(int exp)
Adjusts the amount of experience earned by a player based on the tax rate. Will automatically adjust the exp of the clan and save it.

Parameters:
exp - the old experience

recordClanKill

void recordClanKill()
Called when a member of this clan kills a member of another clan. Will update the clan in the database.


getCurrentClanKills

int getCurrentClanKills()
Returns the number of other-clan kills this clan has recorded.

Returns:
the number of kills.

calculateMapPoints

long calculateMapPoints(java.util.Vector controlledAreas)
Returns the total control points represented by the list of controlled areas given.

Parameters:
controlledAreas - the areas controlled
Returns:
the number of control points represented
See Also:
calculateMapPoints(), getControlledAreas(), Conquerable

calculateMapPoints

long calculateMapPoints()
Returns the total control points earned by this clan

Returns:
the number of control points represented
See Also:
calculateMapPoints(Vector), getControlledAreas(), Conquerable

getControlledAreas

java.util.Vector getControlledAreas()
Returns all the areas on the map controlled by this clan.

Returns:
a vector of area objects
See Also:
Conquerable, Area

setTaxes

void setTaxes(double rate)
Sets the tax rate for this clan.

Parameters:
rate - the tax rate 0-100.0
See Also:
getTaxes()

getTaxes

double getTaxes()
Gets the tax rate for this clan.

Returns:
rate the tax rate 0-100.0
See Also:
setTaxes(double)

getMemberList

DVector getMemberList()
Returns the set of members, where each row represents a member, and the columns are name, role, last login date

Returns:
the membership
See Also:
getMemberList(int), DVector

getMemberList

DVector getMemberList(int PosFilter)
Returns the set of members, where each row represents a member, and the columns are name, role, last login date. Will filter by the given Clan.POS_* constant.

Parameters:
PosFilter -
Returns:
the membership
See Also:
Clan, DVector

getResponsibleMember

MOB getResponsibleMember()
Returns the highest ranking member of this clan.

Returns:
the mob object for the highest ranking member.

getClanRelations

int getClanRelations(java.lang.String id)
Returns a Clan.REL_* constant denoting the relationship between this clan and the clan of the given name.

Parameters:
id - the name of another clan.
Returns:
the Clan.REL_* constant
See Also:
setClanRelations(String, int, long), getLastRelationChange(String)

getLastRelationChange

long getLastRelationChange(java.lang.String id)
Returns the time/date stamp when this clan last changed its relations with the given clan.

Parameters:
id - the other clan
Returns:
when the last change was
See Also:
setClanRelations(String, int, long), getClanRelations(String)

setClanRelations

void setClanRelations(java.lang.String id,
                      int rel,
                      long time)
Sets a new relationship between this clan and the clan with the given id.

Parameters:
id - another clan
rel - the Clan.REL_* constant for the new relationship
time - a current date/time stamp for this change

getGovernment

int getGovernment()
Returns the Clan.GVT_* constant representing the government type of this clan.

Returns:
the Clan.GVT_* constant
See Also:
Clan, setGovernment(int)

setGovernment

void setGovernment(int type)
Returns the Clan.GVT_* constant representing the government type of this clan.

Parameters:
type - the Clan.GVT_* constant
See Also:
Clan, getGovernment()

getTopRank

int getTopRank(MOB mob)
Returns the Clan.POS_* constant representing the highest rank in this clan type.

Parameters:
mob - the mob to check for a top rank
Returns:
the Clan.POS_* constant
See Also:
Clan

delMember

void delMember(MOB M)
Del a member from this clan

Parameters:
M - the member to remove

addMember

void addMember(MOB M,
               int role)
Adds a new member to this clan

Parameters:
M - the member to add
role - the coded role number

update

void update()
Orders the system to update this clan in the database.


destroyClan

void destroyClan()
Orders the system to destroy this clan in the database.


create

void create()
Orders the system to create this clan in the database.


canBeAssigned

boolean canBeAssigned(MOB mob,
                      int role)