public final class BladeCommand
extends java.lang.Object
| Constructor and Description |
|---|
BladeCommand(@NotNull Blade blade,
@Nullable java.lang.Object instance,
@NotNull java.lang.reflect.Method method) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
anyLabelStartsWith(@NotNull java.lang.String input)
Checks if any of the command's labels start with the given input string.
|
java.util.List<ArgumentProvider<?>> |
argumentProviders() |
@NotNull java.util.List<DefinedArgument> |
arguments()
Get all argument parameters.
|
boolean |
async() |
java.lang.String[] |
baseCommands() |
Blade |
blade() |
java.lang.String |
customUsage() |
java.lang.String |
description() |
java.lang.String |
extraUsageData() |
java.util.List<ArgumentProvider<?>> |
flagProviders() |
@NotNull java.util.List<DefinedFlag> |
flags()
Get all flag parameters.
|
boolean |
hasPermission(@NotNull Context context)
Checks if the given context has permission to execute this command.
|
boolean |
hasSenderParameter() |
boolean |
helpCommand() |
@NotNull CommandFeedback<?> |
helpMessage()
Gets or loads the help message for this command.
|
boolean |
hidden() |
java.lang.Object |
instance() |
java.lang.String[] |
labels() |
java.lang.String |
mainLabel() |
java.lang.reflect.Method |
method() |
java.util.List<BladeParameter> |
parameters() |
boolean |
parseQuotes() |
java.lang.String |
permission() |
java.lang.String |
permissionMessage() |
java.util.List<ArgumentProvider<?>> |
rawProviderList() |
java.util.List<SndProvider<?>> |
senderProviders() |
java.lang.Class<?> |
senderType() |
@NotNull CommandInput |
tokenize(@NotNull Sender<?> sender,
@NotNull java.lang.String input,
InputOption... options)
Tokenizes the given input string according to this command's parameters.
|
java.lang.String |
toString() |
@NotNull CommandFeedback<?> |
usageMessage()
Gets or loads the usage message for this command.
|
boolean |
usesBladeContext() |
boolean |
usesBladeSender() |
public BladeCommand(@NotNull
@NotNull Blade blade,
@Nullable
@Nullable java.lang.Object instance,
@NotNull
@NotNull java.lang.reflect.Method method)
@NotNull public @NotNull CommandFeedback<?> usageMessage()
@NotNull public @NotNull CommandFeedback<?> helpMessage()
public boolean anyLabelStartsWith(@NotNull
@NotNull java.lang.String input)
input - the string to checkpublic boolean hasPermission(@NotNull
@NotNull Context context)
context - the command context@NotNull public @NotNull CommandInput tokenize(@NotNull @NotNull Sender<?> sender, @NotNull @NotNull java.lang.String input, @NotNull InputOption... options)
sender - the sender executing the commandinput - the input string to tokenizeoptions - the input options to use during tokenization@NotNull public @NotNull java.util.List<DefinedArgument> arguments()
@NotNull public @NotNull java.util.List<DefinedFlag> flags()
public Blade blade()
public java.lang.Object instance()
public java.lang.reflect.Method method()
public java.lang.String[] labels()
public java.lang.String[] baseCommands()
public java.lang.String description()
public java.lang.String mainLabel()
public java.lang.String customUsage()
public java.lang.String extraUsageData()
public java.lang.String permission()
public java.lang.String permissionMessage()
public boolean async()
public boolean parseQuotes()
public boolean hidden()
public boolean helpCommand()
public boolean hasSenderParameter()
public boolean usesBladeContext()
public boolean usesBladeSender()
public java.lang.Class<?> senderType()
public java.util.List<BladeParameter> parameters()
public java.util.List<ArgumentProvider<?>> rawProviderList()
public java.util.List<ArgumentProvider<?>> argumentProviders()
public java.util.List<ArgumentProvider<?>> flagProviders()
public java.util.List<SndProvider<?>> senderProviders()
public java.lang.String toString()
toString in class java.lang.Object