2020-07-10 16:37:18 +02:00
|
|
|
package net.minestom.server.command.builder;
|
|
|
|
|
2020-07-14 13:35:07 +02:00
|
|
|
import net.minestom.server.command.CommandSender;
|
2020-10-24 16:58:27 +02:00
|
|
|
import org.jetbrains.annotations.NotNull;
|
2020-07-14 13:35:07 +02:00
|
|
|
|
2020-10-17 13:24:18 +02:00
|
|
|
/**
|
|
|
|
* Callback executed once a syntax has been found for a {@link Command}.
|
|
|
|
*/
|
2020-10-11 18:35:32 +02:00
|
|
|
@FunctionalInterface
|
2020-07-14 13:35:07 +02:00
|
|
|
public interface CommandExecutor {
|
2020-10-30 18:43:14 +01:00
|
|
|
|
|
|
|
/**
|
2020-11-12 03:09:36 +01:00
|
|
|
* Executes the command callback once the syntax has been called (or the default executor).
|
2020-10-30 18:43:14 +01:00
|
|
|
*
|
2021-03-10 06:38:51 +01:00
|
|
|
* @param sender the sender of the command
|
|
|
|
* @param context the command context, used to retrieve the arguments and various other things
|
2020-10-30 18:43:14 +01:00
|
|
|
*/
|
2021-03-10 06:38:51 +01:00
|
|
|
void apply(@NotNull CommandSender sender, @NotNull CommandContext context);
|
2020-07-10 16:37:18 +02:00
|
|
|
}
|