Class ShoutCommand

All Implemented Interfaces:
Command
Direct Known Subclasses:
ScreamCommand

public class ShoutCommand extends CommunicationCommand
Shout to someone "shout Help!". Or just shout in general. The interesting part about this command is, because shouting is louder in general than simple talking, that the shout can be heard in neighbouring rooms.
Author:
maartenl
  • Constructor Details

    • ShoutCommand

      public ShoutCommand(String aRegExpr)
  • Method Details

    • 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.
      Overrides:
      actionTo in class CommunicationCommand
      Parameters:
      aUser - the one executing the command
      aTarget - the target of the command
      verb - 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

      protected DisplayInterface action(User aUser, String verb, String message) throws MudException
      Description copied from class: TargetCommand
      Run an action without a target.
      Overrides:
      action in class CommunicationCommand
      Parameters:
      aUser - the one executing the command
      verb - the verb, usually the first word in the command, for example "bow".
      message - the rest of the command, for example "bow evilly" would return "evilly". "bow" would return null.
      Returns:
      something to display
      Throws:
      MudException
    • getCommType

      public CommType getCommType()
      Specified by:
      getCommType in class CommunicationCommand