Class AddonCommand

java.lang.Object
org.bukkit.command.Command
com.palmergames.bukkit.towny.object.AddonCommand

public class AddonCommand extends org.bukkit.command.Command
  • Constructor Details Link icon

  • Method Details Link icon

    • execute Link icon

      public boolean execute(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String label, @NotNull @NotNull String[] args)
      Specified by:
      execute in class org.bukkit.command.Command
    • execute Link icon

      public boolean execute(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String[] args)
    • execute Link icon

      public boolean execute(@NotNull @NotNull org.bukkit.command.CommandSender sender, @NotNull @NotNull String[] args, TownyObject object)
      Used when an AddonCommand should receive a TownyObject name as a preceding argument.
      Parameters:
      sender - CommandSender using the addon command.
      args - String[] args which will have the Town or Nation name as the first String.
      object - A TownyObject, not actually used except to specify the desire to use this method.
      Returns:
      true if the CommandExecutor.onCommand(CommandSender, Command, String, String[]) is successful.
    • getCommandType Link icon

      public TownyCommandAddonAPI.CommandType getCommandType()
    • getName Link icon

      @NotNull public @NotNull String getName()
      Overrides:
      getName in class org.bukkit.command.Command
    • getCommandExecutor Link icon

      public org.bukkit.command.CommandExecutor getCommandExecutor()
    • getTabCompleter Link icon

      public org.bukkit.command.TabCompleter getTabCompleter()
    • getTabCompletions Link icon

      public Map<Integer,List<String>> getTabCompletions()
    • setCommandType Link icon

      public void setCommandType(TownyCommandAddonAPI.CommandType commandType)
    • setName Link icon

      public boolean setName(@NotNull @NotNull String name)
      Overrides:
      setName in class org.bukkit.command.Command
    • setCommandExecutor Link icon

      public void setCommandExecutor(org.bukkit.command.CommandExecutor commandExecutor)
    • setTabCompleter Link icon

      public void setTabCompleter(@Nullable @Nullable org.bukkit.command.TabCompleter tabCompleter)
      Sets the tab completer for this command. If the provided CommandExecutor already implements TabCompleter, this function is not required.
      Parameters:
      tabCompleter - The tab completer to set.
    • setTabCompletions Link icon

      public void setTabCompletions(Map<Integer,List<String>> tabCompletions)
    • setTabCompletion Link icon

      public void setTabCompletion(int index, List<String> completions)
    • getTabCompletion Link icon

      public List<String> getTabCompletion(org.bukkit.command.CommandSender sender, String[] args)