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>>>

public class MultiColonyIdArgument extends MultipleOptionsArgument<List<Integer>>
A command argument that can dynamically resolve to a colony id.
  • Method Details

    • id

      public static MultiColonyIdArgument 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.