Class AsyncPlayerSendSuggestionsEvent

java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
com.destroystokyo.paper.event.brigadier.AsyncPlayerSendSuggestionsEvent
All Implemented Interfaces:
Cancellable

@NullMarked public class AsyncPlayerSendSuggestionsEvent extends PlayerEvent implements Cancellable
Called when sending Suggestions to the client. Will be called asynchronously if a plugin marks the AsyncTabCompleteEvent event handled asynchronously, otherwise called synchronously.
  • Constructor Details

    • AsyncPlayerSendSuggestionsEvent

      @Internal public AsyncPlayerSendSuggestionsEvent(Player player, com.mojang.brigadier.suggestion.Suggestions suggestions, String buffer)
  • Method Details

    • getBuffer

      public String 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()
      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 interface Cancellable
      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 interface Cancellable
      Parameters:
      cancel - true if you wish to cancel this event
    • getHandlers

      public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList

      public static HandlerList getHandlerList()