Package org.bukkit.event.server
Class TabCompleteEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.server.TabCompleteEvent
- All Implemented Interfaces:
- Cancellable
Called when a 
Note that due to client changes, if the sender is a Player, this event will only begin to fire once command arguments are specified, not commands themselves. Plugins wishing to remove commands from tab completion are advised to ensure the client does not have permission for the relevant commands, or use
CommandSender of any description (ie: player or
 console) attempts to tab complete.
 Note that due to client changes, if the sender is a Player, this event will only begin to fire once command arguments are specified, not commands themselves. Plugins wishing to remove commands from tab completion are advised to ensure the client does not have permission for the relevant commands, or use
PlayerCommandSendEvent.- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Constructor SummaryConstructorsConstructorDescriptionTabCompleteEvent(CommandSender sender, String buffer, List<String> completions) 
- 
Method SummaryModifier and TypeMethodDescriptionReturn the entire buffer which formed the basis of this completion.The list of completions which will be offered to the sender, in order.static HandlerListGet the sender completing this command.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.voidsetCompletions(List<String> completions) Set the completions offered, overriding any already set.Methods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
TabCompleteEventpublic TabCompleteEvent(@NotNull CommandSender sender, @NotNull String buffer, @NotNull List<String> completions) 
 
- 
- 
Method Details- 
getSenderGet the sender completing this command.- Returns:
- the CommandSenderinstance
 
- 
getBufferReturn the entire buffer which formed the basis of this completion.- Returns:
- command buffer, as entered
 
- 
getCompletionsThe list of completions which will be offered to the sender, in order. This list is mutable and reflects what will be offered.- Returns:
- a list of offered completions
 
- 
setCompletionsSet the completions offered, overriding any already set.- Parameters:
- completions- the new completions
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancelled) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancelled- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-