|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Command
A Command is a thing entered on the command line by players. It performs some function, right?
Method Summary | |
---|---|
double |
actionsCost(MOB mob,
java.util.List<java.lang.String> cmds)
Returns the number of actions required to completely activate this command. |
boolean |
canBeOrdered()
Whether the a group leader or charmer can order their followers to do this command. |
double |
checkedActionsCost(MOB mob,
java.util.List<java.lang.String> cmds)
Returns the number of actions required to completely activate this command. |
double |
combatActionsCost(MOB mob,
java.util.List<java.lang.String> cmds)
Returns the number of actions required to completely activate this command. |
boolean |
execute(MOB mob,
java.util.List<java.lang.String> commands,
int metaFlags)
This method actually performs the command, when the given parsed set of command-line words. |
java.lang.Object |
executeInternal(MOB mob,
int metaFlags,
java.lang.Object... args)
This method is used for making "insider" calls to the command. |
java.lang.String[] |
getAccessWords()
Returns the set of command words, with the most public one first, that are entered by the user to initiate this command. |
boolean |
preExecute(MOB mob,
java.util.List<java.lang.String> commands,
int metaFlags,
int secondsElapsed,
double actionsRemaining)
This method is only called when the mob invoking this command does not have enough actions to complete it immediately. |
boolean |
securityCheck(MOB mob)
Whether this command is available to the given player |
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.lang.String[] getAccessWords()
double actionsCost(MOB mob, java.util.List<java.lang.String> cmds)
mob
- the mob executing the command, if anycmds
- the parameters to be passed to the command, if any
combatActionsCost(MOB, List)
,
checkedActionsCost(MOB, List)
double combatActionsCost(MOB mob, java.util.List<java.lang.String> cmds)
mob
- the mob executing the command, if anycmds
- the parameters to be passed to the command, if any
actionsCost(MOB, List)
,
checkedActionsCost(MOB, List)
double checkedActionsCost(MOB mob, java.util.List<java.lang.String> cmds)
mob
- the mob executing the command, if anycmds
- the parameters to be passed to the command, if any
combatActionsCost(MOB, List)
,
actionsCost(MOB, List)
boolean canBeOrdered()
boolean securityCheck(MOB mob)
mob
- the player mob who might not even know about this command
boolean execute(MOB mob, java.util.List<java.lang.String> commands, int metaFlags) throws java.io.IOException
mob
- the mob or player issueing the commandcommands
- usually the command words and parameters; a set of stringsmetaFlags
- flags denoting how the command is being executed
java.io.IOException
- usually means the player has dropped carrieractionsCost(MOB, List)
,
securityCheck(MOB)
boolean preExecute(MOB mob, java.util.List<java.lang.String> commands, int metaFlags, int secondsElapsed, double actionsRemaining) throws java.io.IOException
mob
- the player or mob invoking the commandcommands
- the parameters entered for the command (including the trigger word)metaFlags
- flags denoting how the command is being executedsecondsElapsed
- 0 at first, and increments every secondactionsRemaining
- number of free actions the player is defficient.
java.io.IOException
- usually means the player has dropped carrierexecute(MOB, List, int)
java.lang.Object executeInternal(MOB mob, int metaFlags, java.lang.Object... args) throws java.io.IOException
mob
- the mob or player issueing the commandmetaFlags
- flags denoting how the command is being executedargs
- a set of object parameters
java.io.IOException
- usually means the player has dropped carrier
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |