S
- sender typepublic final class RegisteredCommand<S> extends Object
Constructor and Description |
---|
RegisteredCommand(String[] aliases,
Command<S> command,
Predicate<S> permissionChecker) |
Modifier and Type | Method and Description |
---|---|
@NotNull String[] |
getAliases()
Returns the aliases (names) of the registered command.
|
@NotNull Command<S> |
getCommand()
Returns the
Command , held by this RegisteredCommand |
@NotNull LiteralNode |
getCommandStructure()
Returns the cached
LiteralNode of the represented command, which is representing the
command structure. |
@NotNull Predicate<S> |
getPermissionCheckFunction()
Returns the permission check
Predicate . |
boolean |
hasPermission(S sender)
Returns whenever the specified sender has permission to execute this command.
|
String |
toString() |
public boolean hasPermission(@NotNull S sender)
sender
- sendertrue
if has, false
otherwise@NotNull public @NotNull Predicate<S> getPermissionCheckFunction()
Predicate
.@NotNull public @NotNull LiteralNode getCommandStructure()
LiteralNode
of the represented command, which is representing the
command structure.@NotNull public @NotNull String[] getAliases()
@NotNull public @NotNull Command<S> getCommand()
Command
, held by this RegisteredCommandCopyright © 2020. All rights reserved.