public final class LiteralArgument extends Object implements Argument
Modifier and Type | Method and Description |
---|---|
@NotNull List<Argument> |
getChildren()
Returns unmodifiable copy of the children this argument is holding.
|
@NotNull String |
getName()
Returns the name of the argument.
|
static @NotNull LiteralArgument |
literal(@NotNull String name)
Creates a new
LiteralArgument |
@NotNull LiteralArgument |
markShouldExecuteCommand() |
boolean |
shouldExecuteCommand()
Returns whether or not this argument should call the base command's execute method when the
argument ends up being the last typed argument.
|
@NotNull LiteralArgument |
then(Argument... other) |
@NotNull LiteralArgument |
then(@NotNull Argument other)
Adds a child to this argument.
|
@NotNull LiteralArgument |
then(@NotNull Iterable<Argument> iterable) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getArgumentType, getSuggestionsConsumer, isLiteral
@NotNull public static @NotNull LiteralArgument literal(@NotNull @NotNull String name)
LiteralArgument
name
- completion value you see ingame.@NotNull public @NotNull String getName()
Argument
@NotNull public @NotNull LiteralArgument then(@NotNull @NotNull Argument other)
other
- child@NotNull public @NotNull LiteralArgument then(@NotNull Argument... other)
@NotNull public @NotNull LiteralArgument then(@NotNull @NotNull Iterable<Argument> iterable)
@NotNull public @NotNull LiteralArgument markShouldExecuteCommand()
Argument.shouldExecuteCommand()
public boolean shouldExecuteCommand()
Argument
shouldExecuteCommand
in interface Argument
true
if should have execute, false
otherwise@NotNull public @NotNull List<Argument> getChildren()
Argument
getChildren
in interface Argument
Copyright © 2020. All rights reserved.