Class SpellArgument
java.lang.Object
com.binaris.wizardry.content.command.argument.SpellArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<Spell>
public class SpellArgument
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<Spell>
Custom argument type for Spell objects in commands.
This provides proper type safety and validation for spell arguments.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SpellgetSpell(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, String name) <S> CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>listSuggestions(com.mojang.brigadier.context.CommandContext<S> context, com.mojang.brigadier.suggestion.SuggestionsBuilder builder) parse(com.mojang.brigadier.StringReader reader) static SpellArgumentspell()
-
Constructor Details
-
SpellArgument
public SpellArgument()
-
-
Method Details
-
spell
-
getSpell
-
parse
public Spell parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException - Specified by:
parsein interfacecom.mojang.brigadier.arguments.ArgumentType<Spell>- 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:
listSuggestionsin interfacecom.mojang.brigadier.arguments.ArgumentType<Spell>
-
getExamples
- Specified by:
getExamplesin interfacecom.mojang.brigadier.arguments.ArgumentType<Spell>
-