Class ServerCommand

java.lang.Object
megamek.server.commands.ServerCommand
Direct Known Subclasses:
AddBotCommand, AllowGameMasterCommand, AllowTeamChangeCommand, AssignNovaNetServerCommand, BotHelpCommand, CancelGameMasterCommand, CheckBVCommand, CheckBVTeamCommand, ClientServerCommand, DefeatCommand, DenyGameMasterCommand, ExportListCommand, FixElevationCommand, GameMasterCommand, HelpCommand, ListEntitiesCommand, ListSavesCommand, LoadGameCommand, LocalLoadGameCommand, LocalSaveGameCommand, ResetCommand, RollCommand, RulerCommand, SaveGameCommand, SeeAllCommand, ShowEntityCommand, ShowTileCommand, ShowValidTargetsCommand, SingleBlindCommand, SkipCommand, TeamCommand, TraitorCommand, VictoryCommand, WhoCommand

public abstract class ServerCommand extends Object
Since:
March 30, 2002, 6:55 PM
  • Field Details

    • server

      protected Server server
  • Constructor Details

    • ServerCommand

      public ServerCommand(Server server, String name, String helpText)
      Creates new ServerCommand
  • Method Details

    • getName

      public String getName()
      Return the string trigger for this command
    • getHelp

      public String getHelp()
      Returns some help text for this command
    • run

      public abstract void run(int connId, String[] args)
      Run this command with the arguments supplied
    • canRunRestrictedCommand

      public boolean canRunRestrictedCommand(int connId)
      Utility Function for "Restricted Commands." Restricted commands are not password-protected, they are restricted to non-Observers. In the case where there are only Ghosts and/or Observers, the Observers can run restricted commands.