Package io.github.mqzn.commands.base
Interface Command<S>
public sealed interface Command<S>
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
-
Method Summary
Modifier and TypeMethodDescriptionstatic <P,
S> Command.Builder<S> builder
(CommandManager<P, S> manager, String name) Creating a builder instance for proper building of the command instance@NotNull CommandCooldown
cooldown()
Represents a command cooldownvoid
defaultExecution
(S sender, Context<S> commandContext) The default command execution when no args are provided !default boolean
@NotNull CommandInfo
info()
The info of the command, like description, permission, and it's aliasesCommandManager<?,
S> manager()
Command Manager instance that will be used in creation of this commandname()
The name of the command@NotNull Set<CommandRequirement<S>>
The requirements for the command to be executed@NotNull List<CommandSyntax<S>>
syntaxes()
The syntaxes registered for this command
-
Method Details
-
builder
Creating a builder instance for proper building of the command instance- Type Parameters:
P
- the bootstrapS
- the sender- Parameters:
manager
- the command manager for instantiating the command since every command is linked to it's managername
- the command name to start off by using it- Returns:
- the builder instance created
- See Also:
-
manager
CommandManager<?,S> manager()Command Manager instance that will be used in creation of this command- Returns:
- the manager shared instance
-
name
String name()The name of the command- Returns:
- the command name
-
info
The info of the command, like description, permission, and it's aliases- Returns:
- the information of the command
-
cooldown
Represents a command cooldown- Returns:
- the cooldown of the command
-
requirements
The requirements for the command to be executed- Returns:
- The requirements for the command to be executed
-
defaultExecution
The default command execution when no args are provided !- Parameters:
sender
- the command executor !
-
syntaxes
The syntaxes registered for this command- Returns:
- The syntaxes registered for this command
- See Also:
-
hasCooldown
default boolean hasCooldown()
-