Class AsyncPlayerSendSuggestionsEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class AsyncPlayerSendSuggestionsEvent
extends org.bukkit.event.player.PlayerEvent
implements org.bukkit.event.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
org.bukkit.event.Event.Result -
Field Summary
Fields inherited from class org.bukkit.event.player.PlayerEvent
player -
Constructor Summary
ConstructorsConstructorDescriptionAsyncPlayerSendSuggestionsEvent(org.bukkit.entity.Player player, com.mojang.brigadier.suggestion.Suggestions suggestions, String buffer) -
Method Summary
Modifier and TypeMethodDescriptionGets the input buffer sent to request these suggestions.static @NotNull org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListcom.mojang.brigadier.suggestion.SuggestionsGets the suggestions to be sent to client.booleanvoidsetCancelled(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
public AsyncPlayerSendSuggestionsEvent(org.bukkit.entity.Player player, com.mojang.brigadier.suggestion.Suggestions suggestions, String buffer)
-
-
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()- Specified by:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) Cancels sending suggestions to the client.- Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
@NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()
-