Class EmotionToCommand
Object
NormalCommand
TargetCommand
EmotionToCommand
- All Implemented Interfaces:
Command
Provides an emotional response to a person. Acceptable format is:
[emotion] to [person]
For example:
- lick Karn
- nudge Westril
- Author:
- maartenl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DisplayInterface
Run an action without a target.protected DisplayInterface
Run the action command to a target.protected Person
Retrieves a target from the command line, detected in the form of "[command] [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
-
EmotionToCommand
-
-
Method Details
-
actionTo
protected DisplayInterface actionTo(User aUser, Person aTarget, String verb, String command) 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".command
- 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
Description copied from class:TargetCommand
Run an action without a target.- Specified by:
action
in classTargetCommand
- Parameters:
aUser
- the one executing the commandverb
- the verb, usually the first word in the command, for example "bow".command
- the rest of the command, for example "bow evilly" would return "evilly". "bow" would return null.- Returns:
- something to display
- Throws:
MudException
-
getTarget
Retrieves a target from the command line, detected in the form of "[command] [target] stuff". For example "cuddle Karn".- Overrides:
getTarget
in classTargetCommand
- Parameters:
myParsed
- the command, parsed. Usually only needs the first two words.aUser
- the user issuing the command- Returns:
- the Person found, null if no person in the command.
- Throws:
PersonNotFoundException
- if the person is not found in the room.
-