Package dev.jorel.commandapi.executors
Interface PlayerResultingCommandExecutor
- All Superinterfaces:
ResultingExecutor<com.velocitypowered.api.proxy.Player,,VelocityPlayer> TypedExecutor<com.velocitypowered.api.proxy.Player,VelocityPlayer>
- 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 PlayerResultingCommandExecutor
extends ResultingExecutor<com.velocitypowered.api.proxy.Player,VelocityPlayer>
A resulting command executor for a Player
-
Method Summary
Modifier and TypeMethodDescriptiondefault ExecutorTypegetType()Returns the type of the sender of the current executor.intrun(com.velocitypowered.api.proxy.Player sender, CommandArguments args) The code to run when this command is performeddefault intrun(ExecutionInfo<com.velocitypowered.api.proxy.Player, VelocityPlayer> info) The code to run when this command is performedMethods inherited from interface dev.jorel.commandapi.executors.ResultingExecutor
executeWith
-
Method Details
-
run
int run(com.velocitypowered.api.proxy.Player 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 int run(ExecutionInfo<com.velocitypowered.api.proxy.Player, VelocityPlayer> info) throws WrapperCommandSyntaxExceptionThe code to run when this command is performed- Specified by:
runin interfaceResultingExecutor<com.velocitypowered.api.proxy.Player,VelocityPlayer> - Parameters:
info- The ExecutionInfo for this command- Throws:
WrapperCommandSyntaxException
-
getType
Returns the type of the sender of the current executor.- Specified by:
getTypein interfaceTypedExecutor<com.velocitypowered.api.proxy.Player,VelocityPlayer> - Returns:
- the type of the sender of the current executor
-