Package dev.jorel.commandapi.executors
Interface CommandExecutor
- All Superinterfaces:
NormalExecutor<org.bukkit.command.CommandSender,,BukkitCommandSender<? extends org.bukkit.command.CommandSender>> TypedExecutor<org.bukkit.command.CommandSender,BukkitCommandSender<? extends org.bukkit.command.CommandSender>>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface CommandExecutor
extends NormalExecutor<org.bukkit.command.CommandSender,BukkitCommandSender<? extends org.bukkit.command.CommandSender>>
A normal command executor for a CommandSender
-
Method Summary
Modifier and TypeMethodDescriptiondefault ExecutorTypegetType()Returns the type of the sender of the current executor.default voidrun(ExecutionInfo<org.bukkit.command.CommandSender, BukkitCommandSender<? extends org.bukkit.command.CommandSender>> info) The code to run when this command is performedvoidrun(org.bukkit.command.CommandSender sender, CommandArguments args) The code to run when this command is performedMethods inherited from interface dev.jorel.commandapi.executors.NormalExecutor
executeWith
-
Method Details
-
run
void run(org.bukkit.command.CommandSender sender, CommandArguments args) throws WrapperCommandSyntaxException The code to run when this command is performed- Parameters:
sender- The sender of this command (a player, the console etc.)args- The arguments given to this command.- Throws:
WrapperCommandSyntaxException
-
run
default void run(ExecutionInfo<org.bukkit.command.CommandSender, BukkitCommandSender<? extends org.bukkit.command.CommandSender>> info) throws WrapperCommandSyntaxExceptionThe code to run when this command is performed- Specified by:
runin interfaceNormalExecutor<org.bukkit.command.CommandSender,BukkitCommandSender<? extends org.bukkit.command.CommandSender>> - Parameters:
info- The ExecutionInfo for this command- Throws:
WrapperCommandSyntaxException
-
getType
Returns the type of the sender of the current executor.- Specified by:
getTypein interfaceTypedExecutor<org.bukkit.command.CommandSender,BukkitCommandSender<? extends org.bukkit.command.CommandSender>> - Returns:
- the type of the sender of the current executor
-