Class ColonyIdArgument.MineOption

java.lang.Object
com.minecolonies.core.commands.arguments.ColonyIdArgument.MineOption
All Implemented Interfaces:
MultipleOptionsArgument.ArgumentOption<Integer>
Enclosing class:
ColonyIdArgument

public static class ColonyIdArgument.MineOption extends Object implements MultipleOptionsArgument.ArgumentOption<Integer>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    createSuggestions(net.minecraft.world.level.Level world, net.minecraft.commands.SharedSuggestionProvider suggestionProvider, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
    Build any potential suggestions that this option can list for the argument preview when typing.
    boolean
    matches(String value)
    Check if the user defined input matches what this specific argument expects.
    resolveValue(net.minecraft.commands.CommandSourceStack source, String value)
    Resolves a value from the command source during post execution of the command.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MineOption

      public MineOption()
  • Method Details

    • matches

      public boolean matches(String value)
      Description copied from interface: MultipleOptionsArgument.ArgumentOption
      Check if the user defined input matches what this specific argument expects. If this method returns false the process will transfer to the next option.
      Specified by:
      matches in interface MultipleOptionsArgument.ArgumentOption<Integer>
      Parameters:
      value - the original user input.
      Returns:
      true if the option matches the user input, false if not.
    • resolveValue

      public Integer resolveValue(net.minecraft.commands.CommandSourceStack source, String value) throws com.mojang.brigadier.exceptions.CommandSyntaxException
      Description copied from interface: MultipleOptionsArgument.ArgumentOption
      Resolves a value from the command source during post execution of the command.
      Specified by:
      resolveValue in interface MultipleOptionsArgument.ArgumentOption<Integer>
      Parameters:
      source - the command source stack.
      value - the original user input.
      Returns:
      the finalized value that the specific implementation expects.
      Throws:
      com.mojang.brigadier.exceptions.CommandSyntaxException - when the resolver fails to resolve the finalized value.
    • createSuggestions

      public void createSuggestions(net.minecraft.world.level.Level world, net.minecraft.commands.SharedSuggestionProvider suggestionProvider, com.mojang.brigadier.suggestion.SuggestionsBuilder builder)
      Description copied from interface: MultipleOptionsArgument.ArgumentOption
      Build any potential suggestions that this option can list for the argument preview when typing.
      Specified by:
      createSuggestions in interface MultipleOptionsArgument.ArgumentOption<Integer>
      Parameters:
      world - the world the command is being typed/executed in.
      suggestionProvider - the suggestion provider, allowing access to excess suggestion data.
      builder - the suggestion builder.