Class SpellConditionArgument
java.lang.Object
com.binaris.wizardry.content.command.argument.SpellConditionArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<SpellCondition>
public class SpellConditionArgument
extends Object
implements com.mojang.brigadier.arguments.ArgumentType<SpellCondition>
An argument type for parsing
SpellCondition instances from command input.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SpellConditiongetSpellCondition(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String name) parse(com.mojang.brigadier.StringReader reader) Parses aSpellConditionfrom the providedStringReader.static SpellConditionArgumentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.mojang.brigadier.arguments.ArgumentType
getExamples, listSuggestions
-
Constructor Details
-
SpellConditionArgument
public SpellConditionArgument()
-
-
Method Details
-
spellCondition
-
getSpellCondition
public static SpellCondition getSpellCondition(com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> ctx, String name) -
parse
public SpellCondition parse(com.mojang.brigadier.StringReader reader) throws com.mojang.brigadier.exceptions.CommandSyntaxException Parses aSpellConditionfrom the providedStringReader. Reads the input until a space or the end of the input is reached, then attempts to parse it usingSpellCondition.parse(String).- Specified by:
parsein interfacecom.mojang.brigadier.arguments.ArgumentType<SpellCondition>- Parameters:
reader- the string reader containing the input to parse- Returns:
- the parsed
SpellCondition - Throws:
com.mojang.brigadier.exceptions.CommandSyntaxException- if the input cannot be parsed into a validSpellCondition
-