Class MultiColonyIdArgument
java.lang.Object
com.minecolonies.core.commands.arguments.MultipleOptionsArgument<List<Integer>>
com.minecolonies.core.commands.arguments.MultiColonyIdArgument
- All Implemented Interfaces:
com.mojang.brigadier.arguments.ArgumentType<MultipleOptionsArgument.OptionContainer<List<Integer>>>
A command argument that can dynamically resolve to a colony id.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.minecolonies.core.commands.arguments.MultipleOptionsArgument
MultipleOptionsArgument.ArgumentOption<TValue>, MultipleOptionsArgument.OptionContainer<TValue> -
Method Summary
Modifier and TypeMethodDescriptiongetColonies(@NotNull com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, @NotNull String name) Resolve the actual argument value into a list of colonies.getColonyIds(@NotNull com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, @NotNull String name) Resolve the actual argument value into a list of colony ids.static MultiColonyIdArgumentid()Methods inherited from class com.minecolonies.core.commands.arguments.MultipleOptionsArgument
getValue, listSuggestions, parseMethods 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
-
Method Details
-
id
-
getColonies
@NotNull public static @NotNull List<IColony> getColonies(@NotNull @NotNull com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, @NotNull @NotNull String name) Resolve the actual argument value into a list of colonies.- Parameters:
context- the command context.name- the argument name.- Returns:
- the list of colonies.
-
getColonyIds
@NotNull public static @NotNull List<Integer> getColonyIds(@NotNull @NotNull com.mojang.brigadier.context.CommandContext<net.minecraft.commands.CommandSourceStack> context, @NotNull @NotNull String name) Resolve the actual argument value into a list of colony ids.- Parameters:
context- the command context.name- the argument name.- Returns:
- the list of colony ids.
-