Package com.velocitypowered.api.command
Interface RawCommand
-
- All Superinterfaces:
Command
,InvocableCommand<RawCommand.Invocation>
public interface RawCommand extends InvocableCommand<RawCommand.Invocation>
A specialized sub-interface ofCommand
which indicates the proxy should pass the command and its arguments directly without further processing. This is useful for bolting on external command frameworks to Velocity.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
RawCommand.Invocation
Contains the invocation data for a raw command.
-
Method Summary
All Methods Instance Methods Default Methods Deprecated Methods Modifier and Type Method Description default void
execute(CommandSource source, String cmdLine)
Deprecated.seeCommand
default void
execute(CommandSource source, String @NonNull [] args)
Deprecated.default void
execute(RawCommand.Invocation invocation)
Executes the command for the specified invocation.default boolean
hasPermission(CommandSource source, String cmdLine)
Deprecated.seeCommand
default boolean
hasPermission(CommandSource source, String @NonNull [] args)
Deprecated.default CompletableFuture<List<String>>
suggest(CommandSource source, String currentArgs)
Deprecated.seeCommand
default List<String>
suggest(CommandSource source, String @NonNull [] currentArgs)
Deprecated.default CompletableFuture<List<String>>
suggestAsync(CommandSource source, String @NonNull [] currentArgs)
Deprecated.-
Methods inherited from interface com.velocitypowered.api.command.InvocableCommand
hasPermission, suggest, suggestAsync
-
-
-
-
Method Detail
-
execute
@Deprecated default void execute(CommandSource source, String cmdLine)
Deprecated.seeCommand
Executes the command for the specified source.- Parameters:
source
- the source to execute the command forcmdLine
- the arguments for the command
-
execute
@Deprecated default void execute(CommandSource source, String @NonNull [] args)
Deprecated.Description copied from interface:Command
Executes the command for the specified source.
-
execute
default void execute(RawCommand.Invocation invocation)
Description copied from interface:InvocableCommand
Executes the command for the specified invocation.- Specified by:
execute
in interfaceInvocableCommand<RawCommand.Invocation>
- Parameters:
invocation
- the invocation context
-
suggest
@Deprecated default CompletableFuture<List<String>> suggest(CommandSource source, String currentArgs)
Deprecated.seeCommand
Provides tab complete suggestions for the specified source.- Parameters:
source
- the source to execute the command forcurrentArgs
- the partial arguments for the command- Returns:
- the tab complete suggestions
-
suggest
@Deprecated default List<String> suggest(CommandSource source, String @NonNull [] currentArgs)
Deprecated.Description copied from interface:Command
Provides tab complete suggestions for the specified source.
-
suggestAsync
@Deprecated default CompletableFuture<List<String>> suggestAsync(CommandSource source, String @NonNull [] currentArgs)
Deprecated.Description copied from interface:Command
Provides tab complete suggestions for the specified source.- Specified by:
suggestAsync
in interfaceCommand
- Parameters:
source
- the source to execute the command forcurrentArgs
- the partial arguments for the command- Returns:
- the tab complete suggestions
-
hasPermission
@Deprecated default boolean hasPermission(CommandSource source, String cmdLine)
Deprecated.seeCommand
Tests to check if the source has permission to perform the command with the provided arguments.- Parameters:
source
- the source to execute the command forcmdLine
- the arguments for the command- Returns:
true
if the source has permission
-
hasPermission
@Deprecated default boolean hasPermission(CommandSource source, String @NonNull [] args)
Deprecated.Description copied from interface:Command
Tests to check if the source has permission to perform the command with the provided arguments.- Specified by:
hasPermission
in interfaceCommand
- Parameters:
source
- the source to execute the command forargs
- the arguments for the command- Returns:
true
if the source has permission
-
-