com.planet_ink.coffee_mud.Libraries
Class Clans

java.lang.Object
  extended by com.planet_ink.coffee_mud.Libraries.StdLibrary
      extended by com.planet_ink.coffee_mud.Libraries.Clans
All Implemented Interfaces:
CMObject, ClanManager, CMLibrary, java.lang.Cloneable, java.lang.Comparable<CMObject>

public class Clans
extends StdLibrary
implements ClanManager

Portions Copyright (c) 2003 Jeremy Vyska

Portions Copyright (c) 2004 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
 java.util.Hashtable all
           
 
Constructor Summary
Clans()
           
 
Method Summary
 void addClan(Clan C)
           
 java.util.Enumeration allClans()
           
 void clanAnnounce(MOB mob, java.lang.String msg)
           
 void clanAnnounceAll(java.lang.String msg)
           
 java.util.Enumeration clans()
           
 Clan findClan(java.lang.String id)
           
 Clan getClan(java.lang.String id)
           
 int getClanRelations(java.lang.String id1, java.lang.String id2)
           
 Clan getClanType(int type)
           
 int getIntFromRole(int roleType)
           
 int getRoleFromName(int government, java.lang.String position)
           
 java.lang.String getRoleName(int government, int role, boolean titleCase, boolean plural)
           
 int getRoleOrder(int role)
           
 boolean goForward(MOB mob, Clan C, java.util.Vector commands, int function, boolean voteIfNecessary)
           
 java.lang.String ID()
          The CoffeeMud Java Class ID shared by all instances of this object.
 boolean isCommonClanRelations(java.lang.String id1, java.lang.String id2, int relation)
           
 boolean isFamilyOfMembership(MOB M, DVector members)
           
 int numClans()
           
 void removeClan(Clan C)
           
 boolean shutdown()
           
 int size()
           
 void tickAllClans()
           
 java.lang.String translatePrize(int trophy)
           
 boolean trophySystemActive()
           
 
Methods inherited from class com.planet_ink.coffee_mud.Libraries.StdLibrary
activate, compareTo, copyOf, getSupportThread, initializeClass, newInstance
 
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
 
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

all

public java.util.Hashtable all
Constructor Detail

Clans

public Clans()
Method Detail

ID

public java.lang.String ID()
Description copied from interface: CMObject
The CoffeeMud Java Class ID shared by all instances of this object. Unlike the Java Class name, this method does not include package information. However, it must return a String value unique to its class category in the ClassLoader. Class categories include Libraries, Common, Areas, Abilities, Behaviors, CharClasses, Commands, Exits Locales, MOBS, Races, WebMacros, Basic Items, Armor, Weapons, ClanItems, MiscTech. The name is typically identical to the class name.

Specified by:
ID in interface CMObject
Overrides:
ID in class StdLibrary
Returns:
the name of this class

shutdown

public boolean shutdown()
Specified by:
shutdown in interface CMLibrary
Overrides:
shutdown in class StdLibrary

isCommonClanRelations

public boolean isCommonClanRelations(java.lang.String id1,
                                     java.lang.String id2,
                                     int relation)
Specified by:
isCommonClanRelations in interface ClanManager
Returns:

getClanRelations

public int getClanRelations(java.lang.String id1,
                            java.lang.String id2)
Specified by:
getClanRelations in interface ClanManager
Returns:

getClan

public Clan getClan(java.lang.String id)
Specified by:
getClan in interface ClanManager
Returns:

findClan

public Clan findClan(java.lang.String id)
Specified by:
findClan in interface ClanManager
Returns:

getClanType

public Clan getClanType(int type)
Specified by:
getClanType in interface ClanManager
Returns:

isFamilyOfMembership

public boolean isFamilyOfMembership(MOB M,
                                    DVector members)
Specified by:
isFamilyOfMembership in interface ClanManager
Returns:

getRoleOrder

public int getRoleOrder(int role)
Specified by:
getRoleOrder in interface ClanManager
Returns:

getRoleName

public java.lang.String getRoleName(int government,
                                    int role,
                                    boolean titleCase,
                                    boolean plural)
Specified by:
getRoleName in interface ClanManager
Returns:

clans

public java.util.Enumeration clans()
Specified by:
clans in interface ClanManager
Returns:

size

public int size()
Specified by:
size in interface ClanManager
Returns:

addClan

public void addClan(Clan C)
Specified by:
addClan in interface ClanManager

removeClan

public void removeClan(Clan C)
Specified by:
removeClan in interface ClanManager

tickAllClans

public void tickAllClans()
Specified by:
tickAllClans in interface ClanManager

clanAnnounceAll

public void clanAnnounceAll(java.lang.String msg)
Specified by:
clanAnnounceAll in interface ClanManager

numClans

public int numClans()
Specified by:
numClans in interface ClanManager
Returns:

allClans

public java.util.Enumeration allClans()
Specified by:
allClans in interface ClanManager
Returns:

translatePrize

public java.lang.String translatePrize(int trophy)
Specified by:
translatePrize in interface ClanManager
Returns:

trophySystemActive

public boolean trophySystemActive()
Specified by:
trophySystemActive in interface ClanManager
Returns:

goForward

public boolean goForward(MOB mob,
                         Clan C,
                         java.util.Vector commands,
                         int function,
                         boolean voteIfNecessary)
Specified by:
goForward in interface ClanManager
Returns:

clanAnnounce

public void clanAnnounce(MOB mob,
                         java.lang.String msg)
Specified by:
clanAnnounce in interface ClanManager

getIntFromRole

public int getIntFromRole(int roleType)
Specified by:
getIntFromRole in interface ClanManager
Returns:

getRoleFromName

public int getRoleFromName(int government,
                           java.lang.String position)
Specified by:
getRoleFromName in interface ClanManager
Returns: