Class TellCommand
Object
NormalCommand
TargetCommand
TellCommand
- All Implemented Interfaces:
Command
Tell to someone something. The difference with normal communication commands,
is that this one is mandatory to a person and the person does not need to be
in the same room: "tell to Karn Help!".
- Author:
- maartenl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DisplayInterfaceDoes not compute, TellCommand requires a target name.protected DisplayInterfaceRun the action command to a target.protected PersonRetrieves a target from the command line, detected in the form of "[command] to [target] stuff".Methods inherited from class TargetCommand
runMethods inherited from class NormalCommand
getAdminService, getChatService, getEventsService, getGuildService, getHelpService, getItemService, getLogService, getPersonService, getRegExpr, parseCommand, parseCommand, setCallback
-
Constructor Details
-
TellCommand
-
-
Method Details
-
getCommType
-
actionTo
protected DisplayInterface actionTo(User aUser, Person aTarget, String verb, String message) throws MudException Description copied from class:TargetCommandRun the action command to a target.- Specified by:
actionToin classTargetCommand- Parameters:
aUser- the one executing the commandaTarget- the target of the commandverb- the verb, usually the first word in the command, for example "cheer".message- the rest of the command, for example "bow to Marvin evilly", will provide "evilly". But "bow to Marvin" will return a null pointer.- Returns:
- something to display
- Throws:
MudException
-
action
Does not compute, TellCommand requires a target name.- Specified by:
actionin classTargetCommand- Parameters:
aUser-verb-command-- Returns:
- DisplayInterface of the action.
- Throws:
MudException
-
getTarget
Description copied from class:TargetCommandRetrieves a target from the command line, detected in the form of "[command] to [target] stuff".- Overrides:
getTargetin classTargetCommand- Parameters:
myParsed- the command, parsed. Usually only needs the first three words.aUser- the user issuing the command- Returns:
- the Person found.
- Throws:
PersonNotFoundException- if the person is not found in the room.
-