mirror of https://github.com/Minestom/Minestom.git
Rename Command#addConditionalSyntax
This commit is contained in:
parent
156c6a31df
commit
27cfe9c92b
|
@ -130,9 +130,9 @@ public class Command {
|
||||||
* there can be multiple of them when optional arguments are used
|
* there can be multiple of them when optional arguments are used
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public Collection<CommandSyntax> addSyntax(@Nullable CommandCondition commandCondition,
|
public Collection<CommandSyntax> addConditionalSyntax(@Nullable CommandCondition commandCondition,
|
||||||
@NotNull CommandExecutor executor,
|
@NotNull CommandExecutor executor,
|
||||||
@NotNull Argument<?>... args) {
|
@NotNull Argument<?>... args) {
|
||||||
// Check optional argument(s)
|
// Check optional argument(s)
|
||||||
boolean hasOptional = false;
|
boolean hasOptional = false;
|
||||||
{
|
{
|
||||||
|
@ -196,11 +196,11 @@ public class Command {
|
||||||
/**
|
/**
|
||||||
* Adds a new syntax without condition.
|
* Adds a new syntax without condition.
|
||||||
*
|
*
|
||||||
* @see #addSyntax(CommandCondition, CommandExecutor, Argument[])
|
* @see #addConditionalSyntax(CommandCondition, CommandExecutor, Argument[])
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public Collection<CommandSyntax> addSyntax(@NotNull CommandExecutor executor, @NotNull Argument<?>... args) {
|
public Collection<CommandSyntax> addSyntax(@NotNull CommandExecutor executor, @NotNull Argument<?>... args) {
|
||||||
return addSyntax(null, executor, args);
|
return addConditionalSyntax(null, executor, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -249,7 +249,7 @@ public class Command {
|
||||||
* Gets all the syntaxes of this command.
|
* Gets all the syntaxes of this command.
|
||||||
*
|
*
|
||||||
* @return a collection containing all this command syntaxes
|
* @return a collection containing all this command syntaxes
|
||||||
* @see #addSyntax(CommandCondition, CommandExecutor, Argument[])
|
* @see #addSyntax(CommandExecutor, Argument[])
|
||||||
*/
|
*/
|
||||||
@NotNull
|
@NotNull
|
||||||
public Collection<CommandSyntax> getSyntaxes() {
|
public Collection<CommandSyntax> getSyntaxes() {
|
||||||
|
|
Loading…
Reference in New Issue