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 AsyncTabComplete 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 TypeMethodDescriptionstatic @NotNull org.bukkit.event.HandlerList@NotNull org.bukkit.event.HandlerListcom.mojang.brigadier.suggestion.SuggestionsbooleanvoidsetCancelled(boolean cancel) Cancels sending suggestions to the clientvoidsetSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions) 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
- Returns:
- The input buffer sent to request these suggestions
-
getSuggestions
public com.mojang.brigadier.suggestion.Suggestions getSuggestions()- Returns:
- The suggestions being sent to client
-
setSuggestions
public void setSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions) - Parameters:
suggestions- The suggestions to be sent to client if need to change them
-
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()
-