Cancellablepublic class AsyncTabCompleteEvent extends Event implements Cancellable
Event.Result| Constructor | Description |
|---|---|
AsyncTabCompleteEvent(@NotNull CommandSender sender,
@NotNull List<String> completions,
@NotNull String buffer,
boolean isCommand,
@Nullable Location loc) |
| Modifier and Type | Method | Description |
|---|---|---|
@NotNull String |
getBuffer() |
Return the entire buffer which formed the basis of this completion.
|
@NotNull List<String> |
getCompletions() |
The list of completions which will be offered to the sender, in order.
|
static @NotNull HandlerList |
getHandlerList() |
|
@NotNull HandlerList |
getHandlers() |
|
@Nullable Location |
getLocation() |
|
@NotNull CommandSender |
getSender() |
Get the sender completing this command.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
boolean |
isCommand() |
|
boolean |
isHandled() |
If true, the standard process of calling
Command.tabComplete(CommandSender, String, String[])
or current player names will not be called. |
void |
setCancelled(boolean cancelled) |
Will provide no completions, and will not fire the synchronous process
|
void |
setCompletions(@NotNull List<String> completions) |
Set the completions offered, overriding any already set.
|
void |
setHandled(boolean handled) |
Sets whether or not to consider the completion request handled.
|
callEvent, getEventName, isAsynchronouspublic AsyncTabCompleteEvent(@NotNull
@NotNull CommandSender sender,
@NotNull
@NotNull List<String> completions,
@NotNull
@NotNull String buffer,
boolean isCommand,
@Nullable
@Nullable Location loc)
@NotNull public @NotNull CommandSender getSender()
CommandSender instance@NotNull public @NotNull List<String> getCompletions()
Command.tabComplete(CommandSender, String, String[])
or current player names will not be called.public void setCompletions(@NotNull
@NotNull List<String> completions)
Command.tabComplete(CommandSender, String, String[])
or current player names will not be called.
The passed collection will be cloned to a new List. You must call {getCompletions()} to mutate from herecompletions - the new completions@NotNull public @NotNull String getBuffer()
public boolean isCommand()
@Nullable public @Nullable Location getLocation()
public boolean isHandled()
Command.tabComplete(CommandSender, String, String[])
or current player names will not be called.public void setHandled(boolean handled)
Command.tabComplete(CommandSender, String, String[])
or current player names will not be called.handled - if this completion should be marked as being handledpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
setCancelled in interface Cancellablecancelled - true if you wish to cancel this event@NotNull public @NotNull HandlerList getHandlers()
getHandlers in class Event@NotNull public static @NotNull HandlerList getHandlerList()
Copyright © 2020. All rights reserved.