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

    Constructors
    Constructor
    Description
    AsyncPlayerSendSuggestionsEvent(org.bukkit.entity.Player player, com.mojang.brigadier.suggestion.Suggestions suggestions, String buffer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the input buffer sent to request these suggestions.
    static @NotNull org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    com.mojang.brigadier.suggestion.Suggestions
    Gets the suggestions to be sent to client.
    boolean
    void
    setCancelled(boolean cancel)
    Cancels sending suggestions to the client.
    void
    setSuggestions(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AsyncPlayerSendSuggestionsEvent

      public AsyncPlayerSendSuggestionsEvent(org.bukkit.entity.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()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Cancels sending suggestions to the client.
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      @NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      @NotNull public static @NotNull org.bukkit.event.HandlerList getHandlerList()