Class TabCompleteRequestEvent

java.lang.Object
com.velocitypowered.api.event.player.TabCompleteRequestEvent

@AwaitingEvent public class TabCompleteRequestEvent extends Object
This event is fired after a tab complete request is sent by a player, for clients on Minecraft 1.12.2 and below.

Listeners may inspect and modify the partial message before it is sent to the remote server for tab completion.

  • Constructor Details

    • TabCompleteRequestEvent

      public TabCompleteRequestEvent(Player player, String partialMessage)
      Constructs a new TabCompleteRequestEvent.
      Parameters:
      player - the player who initiated the tab completion request
      partialMessage - the message being partially completed
  • Method Details

    • getPlayer

      public Player getPlayer()
      Returns the player requesting the tab completion.
      Returns:
      the requesting player
    • getPartialMessage

      public String getPartialMessage()
      Returns the message being partially completed.
      Returns:
      the partial message
    • setPartialMessage

      public void setPartialMessage(String partialMessage)
      Updates the partial message to be used for tab completion.
      Parameters:
      partialMessage - the new partial message string
    • toString

      public String toString()
      Returns a string representation of this event, useful for debugging.
      Overrides:
      toString in class Object
      Returns:
      a string with the player and partial message