Cancellablepublic class AsyncTabCompleteEvent extends Event implements Cancellable
Event.Result| Constructor | Description |
|---|---|
AsyncTabCompleteEvent(CommandSender sender,
java.util.List<java.lang.String> completions,
java.lang.String buffer,
boolean isCommand,
Location loc) |
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getBuffer() |
Return the entire buffer which formed the basis of this completion.
|
java.util.List<java.lang.String> |
getCompletions() |
The list of completions which will be offered to the sender, in order.
|
static HandlerList |
getHandlerList() |
|
HandlerList |
getHandlers() |
|
Location |
getLocation() |
|
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(java.util.List<java.lang.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(CommandSender sender, java.util.List<java.lang.String> completions, java.lang.String buffer, boolean isCommand, Location loc)
public CommandSender getSender()
CommandSender instancepublic java.util.List<java.lang.String> getCompletions()
Command.tabComplete(CommandSender, String, String[])
or current player names will not be called.public void setCompletions(java.util.List<java.lang.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 completionspublic java.lang.String getBuffer()
public boolean isCommand()
public 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 - public boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancelled)
setCancelled in interface Cancellablecancelled - public HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
Copyright © 2018. All rights reserved.