Cancellablepublic class TabCompleteEvent extends Event implements Cancellable
CommandSender of any description (ie: player or
console) attempts to tab complete.
PlayerCommandSendEvent.Event.Result| Constructor | Description |
|---|---|
TabCompleteEvent(@NotNull CommandSender sender,
@NotNull String buffer,
@NotNull List<String> completions) |
| 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() |
|
@NotNull CommandSender |
getSender() |
Get the sender completing this command.
|
boolean |
isCancelled() |
Gets the cancellation state of this event.
|
void |
setCancelled(boolean cancelled) |
Sets the cancellation state of this event.
|
void |
setCompletions(@NotNull List<String> completions) |
Set the completions offered, overriding any already set.
|
getEventName, isAsynchronouspublic TabCompleteEvent(@NotNull
@NotNull CommandSender sender,
@NotNull
@NotNull String buffer,
@NotNull
@NotNull List<String> completions)
@NotNull public @NotNull CommandSender getSender()
CommandSender instance@NotNull public @NotNull String getBuffer()
@NotNull public @NotNull List<String> getCompletions()
public void setCompletions(@NotNull
@NotNull List<String> completions)
completions - the new completionspublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
CancellablesetCancelled 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.