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
-
Method Summary
Modifier and TypeMethodDescriptionGets the input buffer sent to request these suggestions.static @NotNull HandlerList
@NotNull com.mojang.brigadier.suggestion.Suggestions
Gets the suggestions to be sent to client.boolean
Gets the cancellation state of this event.void
setCancelled
(boolean cancel) Cancels sending suggestions to the client.void
setSuggestions
(@NotNull com.mojang.brigadier.suggestion.Suggestions suggestions) Sets the suggestions to be sent to client.Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
Methods 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
Gets the suggestions to be sent to client.- Returns:
- the suggestions
-
setSuggestions
public void setSuggestions(@NotNull @NotNull com.mojang.brigadier.suggestion.Suggestions suggestions) Sets the suggestions to be sent to client.- Parameters:
suggestions
- suggestions
-
isCancelled
public boolean isCancelled()Gets 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:
isCancelled
in interfaceCancellable
- Returns:
- true if 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:
setCancelled
in interfaceCancellable
- Parameters:
cancel
- true if you wish to cancel this event
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-