public static class ArgumentTypes.Builder<A extends revxrsal.commands.command.CommandActor>
extends java.lang.Object
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
@NotNull ArgumentTypes.Builder<A> |
addType(java.lang.Class<?> type,
@NotNull com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
Registers an
ArgumentType that matches a specific class. |
@NotNull ArgumentTypes.Builder<A> |
addTypeFactory(@NotNull ArgumentTypeFactory<? super A> factory)
Registers an
ArgumentTypeFactory to this registry. |
@NotNull ArgumentTypes.Builder<A> |
addTypeFactoryLast(@NotNull ArgumentTypeFactory<? super A> factory)
Registers an
ArgumentTypeFactory to this registry. |
@NotNull ArgumentTypes.Builder<A> |
addTypeLast(java.lang.Class<?> type,
@NotNull com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
Registers an
ArgumentType that matches a specific class. |
@NotNull ArgumentTypes<A> |
build()
Returns a new
ArgumentTypes registry |
@NotNull public @NotNull ArgumentTypes.Builder<A> addType(java.lang.Class<?> type, @NotNull @NotNull com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
ArgumentType that matches a specific class. Note
that this will not include subclasses of such class.
If you would like to include subclasses, register the factory
created by ArgumentTypeFactory.forTypeAndSubclasses(Class, ArgumentType).
type - The type to register forargumentType - The provider@NotNull public @NotNull ArgumentTypes.Builder<A> addTypeLast(java.lang.Class<?> type, @NotNull @NotNull com.mojang.brigadier.arguments.ArgumentType<?> argumentType)
ArgumentType that matches a specific class. Note
that this will not include subclasses of such class.
If you would like to include subclasses, register the factory
created by ArgumentTypeFactory.forTypeAndSubclasses(Class, ArgumentType).
Note that this will be given lower priority over other providers.
type - The type to register forargumentType - The provider@NotNull public @NotNull ArgumentTypes.Builder<A> addTypeFactory(@NotNull @NotNull ArgumentTypeFactory<? super A> factory)
ArgumentTypeFactory to this registry.factory - The factory to register@NotNull public @NotNull ArgumentTypes.Builder<A> addTypeFactoryLast(@NotNull @NotNull ArgumentTypeFactory<? super A> factory)
ArgumentTypeFactory to this registry.
Note that this will be given lower priority over other providers.
factory - The factory to register@Contract(value="-> new",
pure=true)
@NotNull
public @NotNull ArgumentTypes<A> build()
ArgumentTypes registry