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 -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateSuggestions(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.booleanCheck 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.
-
Constructor Details
-
MineOption
public MineOption()
-
-
Method Details
-
matches
Description copied from interface:MultipleOptionsArgument.ArgumentOptionCheck 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:
matchesin interfaceMultipleOptionsArgument.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.ArgumentOptionResolves a value from the command source during post execution of the command.- Specified by:
resolveValuein interfaceMultipleOptionsArgument.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.
-