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

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

    Modifier and Type
    Method
    Description
     
    static @NotNull org.bukkit.event.HandlerList
     
    @NotNull org.bukkit.event.HandlerList
     
    com.mojang.brigadier.suggestion.Suggestions
     
    boolean
    void
    setCancelled(boolean cancel)
    Cancels sending suggestions to the client
    void
    setSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions)
     

    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()
      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:
      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()