Class CommunicationCommand

Object
NormalCommand
TargetCommand
CommunicationCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
AskCommand, SayCommand, ShoutCommand, WhisperCommand

public abstract class CommunicationCommand extends TargetCommand
Author:
maartenl
  • Constructor Details

    • CommunicationCommand

      public CommunicationCommand(String regExpr)
  • Method Details

    • getCommType

      public abstract CommType 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 class TargetCommand
      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 command) throws MudException
      Description copied from class: TargetCommand
      Run an action without a target.
      Specified by:
      action in class TargetCommand
      Parameters:
      aUser - the one executing the command
      verb - 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