Class BrigadierCommandRegistry.BrigadierArgumentShape

java.lang.Object
dev.ua.theroer.magicutils.commands.brigadier.BrigadierCommandRegistry.BrigadierArgumentShape
Enclosing class:
BrigadierCommandRegistry<S>

public static final class BrigadierCommandRegistry.BrigadierArgumentShape extends Object
Brigadier-side shape for a single command argument.
  • Method Details

    • of

      public static BrigadierCommandRegistry.BrigadierArgumentShape of(com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
      Creates a shape from a standard Brigadier argument type.
      Parameters:
      argumentType - Brigadier argument type
      Returns:
      argument shape
    • nativeSuggestions

      public static BrigadierCommandRegistry.BrigadierArgumentShape nativeSuggestions(com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
      Creates a shape that uses native Brigadier suggestions for this argument.
      Parameters:
      argumentType - Brigadier argument type
      Returns:
      argument shape
    • argumentType

      public com.mojang.brigadier.arguments.ArgumentType<?> argumentType()
      Returns the underlying Brigadier argument type.
      Returns:
      argument type
    • useNativeSuggestions

      public boolean useNativeSuggestions()
      Returns whether to use native suggestions.
      Returns:
      true for native suggestions
    • literalAlternatives

      public List<String> literalAlternatives()
      Returns the list of literal alternatives for this argument.
      Returns:
      literal alternatives
    • withLiteralAlternative

      public BrigadierCommandRegistry.BrigadierArgumentShape withLiteralAlternative(String literal)
      Returns a new shape with an added literal alternative.
      Parameters:
      literal - literal value
      Returns:
      new shape
    • withLiteralAlternatives

      public BrigadierCommandRegistry.BrigadierArgumentShape withLiteralAlternatives(String... literals)
      Returns a new shape with added literal alternatives.
      Parameters:
      literals - literal values
      Returns:
      new shape
    • withLiteralAlternatives

      public BrigadierCommandRegistry.BrigadierArgumentShape withLiteralAlternatives(List<String> literals)
      Returns a new shape with added literal alternatives.
      Parameters:
      literals - literal values
      Returns:
      new shape