java.lang.Object
dev.sympho.modular_commands.api.command.ImmutableCommand.Builder<H>
dev.sympho.modular_commands.api.command.Command.Builder<H>
- Type Parameters:
H- The handler type.
public static class Command.Builder<H extends @NonNull Handlers>
extends dev.sympho.modular_commands.api.command.ImmutableCommand.Builder<H>
The default builder.
- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Command.Builder<H>Initializes the value for theparentattribute.Methods inherited from class dev.sympho.modular_commands.api.command.ImmutableCommand.Builder
addAliases, addAliases, addAllAliases, addAllParameters, addParameters, addParameters, aliases, build, callable, deferReply, description, displayName, from, handlers, id, inheritSettings, invokeParent, name, nsfw, parameters, parent, repliesDefaultPrivate, requiredGroup, requireParentGroups, scope, skipGroupCheckOnInteraction
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
parent
Initializes the value for theparentattribute.If not set, this attribute will have a default value as returned by the initializer of
parent.- Parameters:
parent- The parent command.- Returns:
thisbuilder for use in a chained invocation.- See Also:
-
ImmutableCommand.Builder.parent(Invocation)Command.invocation()
- API Note:
- This is a shortcut to use an existing command instance instead of having to separately maintain the parent invocation. However, note that creating entirely new instances for this may have performance implications; it is best used with an existing instance (such as the one to be registered) when possible.
-