Class DimensionsCommand

java.lang.Object
me.xxastaspastaxx.dimensions.commands.DimensionsCommand
Direct Known Subclasses:
AddonCommand, AdminHelpCommand, AdminPermissionsCommand, ClearCommand, HelpCommand, InfoCommand, PermissionsCommand, PortalCommand, PortalsCommand, ReloadCommand, TestCommand

public abstract class DimensionsCommand extends Object
Parent class of commands that are being executed with /dim [command]
  • Constructor Details

    • DimensionsCommand

      public DimensionsCommand(String command, String args, String[] aliases, String description, String permission, boolean adminCommand)
      Constructor of DimensionsCommand
      Parameters:
      command - the command
      args - a string showing what arguments are required to execute the ocmmand
      aliases - String array with aliases for the command
      description - Short description of the command
      permission - empty string to allow the default permission or the permission to run the command
      adminCommand - true if this command should not be viewed by non-admin users
  • Method Details

    • isThisCommand

      public boolean isThisCommand(String contentRaw)
      Check if the command run was this instance
      Parameters:
      contentRaw - the command
      Returns:
      true if its the command or an alias of the command
    • getCommand

      public String getCommand()
      Get command
      Returns:
      the command
    • getArgs

      public String getArgs()
      Get the args
      Returns:
      the args
    • getAliases

      public String[] getAliases()
      Get the aliases
      Returns:
      the aliases
    • getDescription

      public String getDescription()
      Get the description
      Returns:
      the description
    • getPermission

      public String getPermission()
      Get the permission
      Returns:
      the permission
    • isAdminCommand

      public boolean isAdminCommand()
      If its an admin command
      Returns:
      true if its an admin command
    • execute

      public abstract void execute(org.bukkit.command.CommandSender sender, String[] args)
      Execute the command
      Parameters:
      sender - the sender of the command
      args - the arguments used