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 DisplayInterface
Does not compute, TellCommand requires a target name.protected DisplayInterface
Run the action command to a target.protected Person
Retrieves a target from the command line, detected in the form of "[command] to [target] stuff".Methods inherited from class TargetCommand
run
Methods 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:TargetCommand
Run the action command to a target.- Specified by:
actionTo
in 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:
action
in classTargetCommand
- Parameters:
aUser
-verb
-command
-- Returns:
- DisplayInterface of the action.
- Throws:
MudException
-
getTarget
Description copied from class:TargetCommand
Retrieves a target from the command line, detected in the form of "[command] to [target] stuff".- Overrides:
getTarget
in 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.
-