Class AsyncPlayerSendSuggestionsEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent
- All Implemented Interfaces:
Cancellable
Called when sending
Suggestions to the client. Will be called asynchronously if a plugin
marks the AsyncTabCompleteEvent event handled asynchronously,
otherwise called synchronously.-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionAsyncPlayerSendSuggestionsEvent(Player player, com.mojang.brigadier.suggestion.Suggestions suggestions, String buffer) -
Method Summary
Modifier and TypeMethodDescriptionGets the input buffer sent to request these suggestions.static HandlerListcom.mojang.brigadier.suggestion.SuggestionsGets the suggestions to be sent to client.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Cancels sending suggestions to the client.voidsetSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions) Sets the suggestions to be sent to client.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayerMethods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
Constructor Details
-
AsyncPlayerSendSuggestionsEvent
-
-
Method Details
-
getBuffer
Gets the input buffer sent to request these suggestions.- Returns:
- the input buffer
-
getSuggestions
public com.mojang.brigadier.suggestion.Suggestions getSuggestions()Gets the suggestions to be sent to client.- Returns:
- the suggestions
-
setSuggestions
public void setSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions) Sets the suggestions to be sent to client.- Parameters:
suggestions- suggestions
-
isCancelled
public 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 interfaceCancellable- Returns:
trueif this event is cancelled
-
setCancelled
public void setCancelled(boolean cancel) Cancels sending suggestions to the client.Sets 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 interfaceCancellable- Parameters:
cancel-trueif you wish to cancel this event
-
getHandlers
- Specified by:
getHandlersin classEvent
-
getHandlerList
-