Class ElementArgument

java.lang.Object
com.binaris.wizardry.content.command.argument.ElementArgument
All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<Element>

public class ElementArgument extends Object implements com.mojang.brigadier.arguments.ArgumentType<Element>
Custom argument type for Element objects in commands. This provides proper type safety and validation for Element arguments.
  • Constructor Details

    • ElementArgument

      public ElementArgument()
  • Method Details

    • element

      public static ElementArgument element()
    • getElement

      public static Element getElement(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String name)
    • parse

      public Element parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Specified by:
      parse in interface com.mojang.brigadier.arguments.ArgumentType<Element>
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException
    • listSuggestions

      public <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
      Specified by:
      listSuggestions in interface com.mojang.brigadier.arguments.ArgumentType<Element>
    • getExamples

      public Collection<String> getExamples()
      Specified by:
      getExamples in interface com.mojang.brigadier.arguments.ArgumentType<Element>