Interface CommandModule

All Known Implementing Classes:
AddCommandModule, DataCommandModule, DefaultCommandModule, EditCommandModule, EffectsCommandModule, FixedCommandModule, GroupCommandModule, GUICommandModule, HelpCommandModule, ListCommandModule, ReloadCommandModule, RemoveCommandModule, ResetCommandModule, StylesCommandModule, ToggleCommandModule, UseCommandModule, VersionCommandModule, WorldsCommandModule

public interface CommandModule
  • Method Details

    • onCommandExecute

      void onCommandExecute​(PPlayer pplayer, java.lang.String[] args)
      Called when this command gets executed
      Parameters:
      pplayer - The PPlayer who executed this command
      args - The arguments to this command
    • onTabComplete

      java.util.List<java.lang.String> onTabComplete​(PPlayer pplayer, java.lang.String[] args)
      Called when a player tries to tab complete this command
      Parameters:
      pplayer - The PPlayer who is tab completing this command
      args - Arguments typed so far
      Returns:
      A list of possible argument values
    • getName

      java.lang.String getName()
      Gets the name of this command
      Returns:
      The name of this command
    • getDescriptionKey

      java.lang.String getDescriptionKey()
      Gets the locale description key of this command
      Returns:
      The locale description key of this command
    • getArguments

      java.lang.String getArguments()
      Gets any arguments this command has
      Returns:
      The arguments this command has
    • requiresEffectsAndStyles

      boolean requiresEffectsAndStyles()
      True if this command requires the player to have any effects and styles
      Returns:
      If the player must have effects and styles to use this command
    • canConsoleExecute

      boolean canConsoleExecute()
      Returns:
      true if this command can be executed from console, otherwise false
    • printUsage

      static void printUsage​(PPlayer pplayer, CommandModule command)
      Displays a command's usage to the player
      Parameters:
      pplayer - The PPlayer to display the command usage to
      command - The command to display usage for
    • printUsageWithDescription

      static void printUsageWithDescription​(PPlayer pplayer, CommandModule command)
      Displays a command's usage (with its description) to the player
      Parameters:
      pplayer - The PPlayer to display the command usage to
      command - The command to display usage for