Class ApplicationCommand

java.lang.Object
preponderous.ponder.system.abs.ApplicationCommand

public abstract class ApplicationCommand extends Object
Since:
January 5th, 2022
  • Constructor Details

  • Method Details

    • execute

      public abstract boolean execute(CommandSender sender)
      Method to execute the command with no arguments.
      Parameters:
      sender - The sender of the command.
      Returns:
      Whether the execution of the command was successful.
    • execute

      public abstract boolean execute(CommandSender sender, String[] args)
      Method to execute the command with arguments.
      Parameters:
      sender - The sender of the command.
      args - The arguments of the command.
      Returns:
      Whether the execution of the command was successful.
    • sendMessageIfNoArguments

      public boolean sendMessageIfNoArguments(String message, String[] args, CommandSender sender)
      Method to send a message to a command sender if there are arguments.
      Parameters:
      message - The message to send.
      args - The arguments to check.
      sender - The sender of the command that we will be sending the message to.
      Returns:
      Boolean signifying whether there were no arguments.
      Since:
      10/12/2021
    • getIntSafe

      public int getIntSafe(String line, int orElse)
      Method to get an Integer from a String.
      Parameters:
      line - to convert into an Integer.
      orElse - if the conversion fails.
      Returns:
      Integer numeric.
      Since:
      05/05/2021 - 12:18
    • safeEquals

      public boolean safeEquals(boolean matchCase, String what, String... goals)
      Method to test if something matches any goal string.
      Parameters:
      what - to test
      goals - to compare with
      matchCase - for the comparison (or not)
      Returns:
      true if something in goals matches what.
      Since:
      05/05/2021 - 12:18
    • getNames

      public ArrayList<String> getNames()
    • getPermissions

      public ArrayList<String> getPermissions()
    • extractArgumentsInsideDoubleQuotes

      public ArrayList<String> extractArgumentsInsideDoubleQuotes(String[] args) throws Exception
      Throws:
      Exception