Class RegistryEntryArgument.Builder<C,V>

java.lang.Object
cloud.commandframework.arguments.CommandArgument.Builder<C,T>
cloud.commandframework.arguments.CommandArgument.TypedBuilder<C,V,RegistryEntryArgument.Builder<C,V>>
cloud.commandframework.fabric.argument.RegistryEntryArgument.Builder<C,V>
Type Parameters:
C - The sender type
V - The registry value type
Enclosing class:
RegistryEntryArgument<C,V>

public static final class RegistryEntryArgument.Builder<C,V> extends cloud.commandframework.arguments.CommandArgument.TypedBuilder<C,V,RegistryEntryArgument.Builder<C,V>>
A builder for RegistryEntryArgument.
Since:
1.5.0
  • Method Summary

    Modifier and Type
    Method
    Description
    asOptionalWithDefault(@NonNull net.minecraft.resources.ResourceKey<V> defaultValue)
    Sets the command argument to be optional, with the specified default value.
    @NonNull RegistryEntryArgument<@NonNull C,@NonNull V>
     

    Methods inherited from class cloud.commandframework.arguments.CommandArgument.TypedBuilder

    asOptional, asOptionalWithDefault, asRequired, manager, self, withParser, withSuggestionsProvider

    Methods inherited from class cloud.commandframework.arguments.CommandArgument.Builder

    getDefaultDescription, getDefaultValue, getName, getParser, getSuggestionsProvider, getValueType, isRequired, withDefaultDescription

    Methods inherited from class java.lang.Object

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

    • build

      public @NonNull RegistryEntryArgument<@NonNull C,@NonNull V> build()
      Overrides:
      build in class cloud.commandframework.arguments.CommandArgument.Builder<C,V>
    • asOptionalWithDefault

      public @NonNull RegistryEntryArgument.Builder<C,V> asOptionalWithDefault(@NonNull net.minecraft.resources.ResourceKey<V> defaultValue)
      Sets the command argument to be optional, with the specified default value.
      Parameters:
      defaultValue - default value
      Returns:
      this builder
      Since:
      1.5.0
      See Also:
      • CommandArgument.Builder.asOptionalWithDefault(String)