Class AsyncPlayerSendSuggestionsEvent

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

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

  • Method Details

    • getBuffer

      @NotNull public @NotNull String getBuffer()
      Gets the input buffer sent to request these suggestions.
      Returns:
      the input buffer
    • getSuggestions

      @NotNull public @NotNull com.mojang.brigadier.suggestion.Suggestions 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 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

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

      @NotNull public static @NotNull HandlerList getHandlerList()