mirror of https://github.com/Minestom/Minestom.git
19 lines
624 B
Java
19 lines
624 B
Java
package net.minestom.server.command.builder;
|
|
|
|
import net.minestom.server.command.CommandSender;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/**
|
|
* Callback executed once a syntax has been found for a {@link Command}.
|
|
*/
|
|
@FunctionalInterface
|
|
public interface CommandExecutor {
|
|
|
|
/**
|
|
* Executes the command callback once the syntax has been called (or the default executor).
|
|
*
|
|
* @param sender the sender of the command
|
|
* @param context the command context, used to retrieve the arguments and various other things
|
|
*/
|
|
void apply(@NotNull CommandSender sender, @NotNull CommandContext context);
|
|
} |