Class CommandMeta

java.lang.Object
de.eldoria.eldoutilities.commands.command.CommandMeta

public class CommandMeta extends Object
  • Constructor Details

  • Method Details

    • builder

      public static CommandMetaBuilder builder(String name)
    • createCommandCall

      public String createCommandCall()
      Create a command call route based on this command.

      This method traced back to the parent commands until the end is reached.

      Returns:
      a string containing all commands of the route in the correct order.
    • name

      public String name()
      Get the name of the command
      Returns:
      name of command
    • permissions

      public Set<String> permissions()
      A set of permissions, which may be required for this command.
      Returns:
      set of permissions
    • allowedSender

      public Set<Class<? extends CommandSender>> allowedSender()
      Set of command senders which are allowed to use this command
      Returns:
      set of command senders
    • arguments

      public List<Argument> arguments()
      Ordered list of arguments. The list is ordered by creation order.
      Returns:
      list of arguments
    • defaultCommand

      public AdvancedCommand defaultCommand()
    • subCommands

      public Map<String,AdvancedCommand> subCommands()
    • registeredCommands

      public Set<String> registeredCommands()
    • requiredArguments

      public int requiredArguments()
    • argumentString

      public String argumentString()
    • parent

      protected void parent(AdvancedCommand parent)
    • parent

      public AdvancedCommand parent()
    • isCommand

      public boolean isCommand(String value)
    • forSubCommand

      public CommandMetaBuilder forSubCommand(String name, AdvancedCommand parent)
      Creates a meta for a internal subcommand. This is for small commands only and has several caveats.

      Only set arguments on this builder. Everything else wont have any effect.

      Parameters:
      name - name of internal subcommand
      parent - parent command which contains this subcommand
      Returns:
      a builder which allows to add arguments.
    • aliases

      public String[] aliases()
    • isHidden

      public boolean isHidden()