Class AbstractPluginCommand

java.lang.Object
preponderous.ponder.minecraft.bukkit.abs.AbstractPluginCommand

public abstract class AbstractPluginCommand extends Object
  • Constructor Details

  • Method Details

    • execute

      public abstract boolean execute(org.bukkit.command.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(org.bukkit.command.CommandSender sender, String[] args)
      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, org.bukkit.command.CommandSender sender, org.bukkit.ChatColor color)
      Parameters:
      message - to send.
      args - to check.
      sender - to send message to.
      color - of the message.
      Returns:
      Boolean signifying whether there were no arguments.
      Since:
      10/12/2021
    • getIntSafe

      public int getIntSafe(String line, int orElse)
      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()
      Returns:
      A list of names of the command.
    • getPermissions

      public ArrayList<String> getPermissions()
      Returns:
      A list of permissions of the command.
    • extractArgumentsInsideDoubleQuotes

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