|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.player.PlayerGroups
Manages players grouping together.
Nested Class Summary | |
static class |
PlayerGroups.Group
Tracks a single group. |
Field Summary | |
static int |
FOOD_DELAY
|
Method Summary | |
void |
addCommands(java.util.Map commands,
CommandList list)
Adds commands. |
static boolean |
checkProximity(GameObject o1,
GameObject o2)
Checks if 2 players are close enough to do group commands. |
CommandEvent |
createEvent(CommandEvent event)
Creates the event. |
static PlayerGroups.Group |
createGroup(java.lang.String leader)
Creates a group under a certain person. |
boolean |
disband(CommandEvent event,
Commandable agent)
Executes the "disband" command. |
boolean |
execute(CommandEvent event)
Executes the event. |
boolean |
follow(CommandEvent event,
Commandable agent)
Executes the "follow" command. |
static PlayerGroups.Group |
getGroup(java.lang.String name)
Returns the group led by the passed character, if any. |
static java.util.HashMap |
getGroups()
Returns all the groups in the game. |
static PlayerGroups |
getImpl()
|
boolean |
group(CommandEvent event,
Commandable agent)
Executes the "group" command. |
static boolean |
grouped(Player p1,
Player p2)
Returns true if two players are in the same group. |
boolean |
groupname(CommandEvent event,
Commandable agent)
Executes the "groupname" command. |
boolean |
groups(CommandEvent event)
Shows what groups are currently online. |
boolean |
grouptell(CommandEvent event,
Commandable agent)
Executes the "grouptell" command. |
boolean |
knowsCommand(java.lang.String command)
Returns true if we want to handle the command. |
boolean |
members(CommandEvent event,
Commandable agent)
Executes the "members" command. |
void |
printGroup(Commandable agent)
Tells the agent about his/her group membership. |
boolean |
publish(Commandable agent,
boolean publish)
Publishes a group so other people can see it. |
static void |
removeGroup(java.lang.String leader)
Removes and disbands the specified group. |
boolean |
unfollow(CommandEvent event,
Commandable agent)
Executes the "follow" command. |
boolean |
ungroup(CommandEvent event,
Commandable agent)
Executes the "ungroup" command. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int FOOD_DELAY
Method Detail |
public static PlayerGroups getImpl()
public void addCommands(java.util.Map commands, CommandList list)
addCommands
in interface BuiltInCommand
commands
- the map to add tolist
- the command list we're registering in, from which
we can derive the command agent (i.e. player or monster) and other
information.public boolean knowsCommand(java.lang.String command)
knowsCommand
in interface Command
command
- the entire command string, including arguments
public CommandEvent createEvent(CommandEvent event)
createEvent
in interface Command
event
- a "blank" CommandEvent containing only the
command text and the agent who's performing the command. This
initial event is created by the originator of the event (e.g.
the AI or player's command preprocessor).
public boolean execute(CommandEvent event)
execute
in interface Command
event
- the CommandEvent to execute
public boolean follow(CommandEvent event, Commandable agent)
public static boolean checkProximity(GameObject o1, GameObject o2)
public boolean unfollow(CommandEvent event, Commandable agent)
public boolean group(CommandEvent event, Commandable agent)
public boolean ungroup(CommandEvent event, Commandable agent)
public boolean disband(CommandEvent event, Commandable agent)
public boolean groupname(CommandEvent event, Commandable agent)
public boolean members(CommandEvent event, Commandable agent)
public boolean grouptell(CommandEvent event, Commandable agent)
public static PlayerGroups.Group getGroup(java.lang.String name)
public static java.util.HashMap getGroups()
public static PlayerGroups.Group createGroup(java.lang.String leader)
leader
- the name of the person leading the group.public static void removeGroup(java.lang.String leader)
public void printGroup(Commandable agent)
public boolean publish(Commandable agent, boolean publish)
agent
- the player executing the publish commandpublish
- true to publish the group so others can see itpublic boolean groups(CommandEvent event)
public static boolean grouped(Player p1, Player p2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |