Class CompoundTagArgument<C>

java.lang.Object
cloud.commandframework.arguments.CommandArgument<C,net.minecraft.nbt.CompoundTag>
cloud.commandframework.fabric.argument.CompoundTagArgument<C>
Type Parameters:
C - the sender type
All Implemented Interfaces:
cloud.commandframework.keys.CloudKeyHolder<net.minecraft.nbt.CompoundTag>, Comparable<cloud.commandframework.arguments.CommandArgument<?,?>>

public final class CompoundTagArgument<C> extends cloud.commandframework.arguments.CommandArgument<C,net.minecraft.nbt.CompoundTag>
An argument for the string representation of an NBT CompoundTag.
Since:
1.5.0
  • Method Details

    • builder

      public static <C> @NonNull CompoundTagArgument.Builder<C> builder(@NonNull String name)
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Name of the component
      Returns:
      Created builder
      Since:
      1.5.0
    • of

      public static <C> @NonNull CompoundTagArgument<C> of(@NonNull String name)
      Create a new required CompoundTagArgument.
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Component name
      Returns:
      Created argument
      Since:
      1.5.0
    • optional

      public static <C> @NonNull CompoundTagArgument<C> optional(@NonNull String name)
      Create a new optional CompoundTagArgument.
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Component name
      Returns:
      Created argument
      Since:
      1.5.0
    • optional

      public static <C> @NonNull CompoundTagArgument<C> optional(@NonNull String name, @NonNull net.minecraft.nbt.CompoundTag defaultTag)
      Create a new optional CompoundTagArgument with the specified default value.
      Type Parameters:
      C - Command sender type
      Parameters:
      name - Component name
      defaultTag - Default tag value
      Returns:
      Created argument
      Since:
      1.5.0