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 Details

    • SpellConditionArgument

      public SpellConditionArgument()
  • Method Details

    • spellCondition

      public static SpellConditionArgument 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 a SpellCondition from the provided StringReader. Reads the input until a space or the end of the input is reached, then attempts to parse it using SpellCondition.parse(String).
      Specified by:
      parse in interface com.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 valid SpellCondition