Class TabCompleteEvent
- java.lang.Object
-
- com.velocitypowered.api.event.player.TabCompleteEvent
-
@AwaitingEvent public class TabCompleteEvent extends Object
This event is fired after a tab complete response is sent by the remote server, for clients on 1.12.2 and below. You have the opportunity to modify the response sent to the remote player. Velocity will wait for this event to finish firing before sending the tab complete results to the client. Be sure to be as fast as possible, since the client will freeze while it waits for the tab complete results.
-
-
Constructor Summary
Constructors Constructor Description TabCompleteEvent(Player player, String partialMessage, List<String> suggestions)Constructs a new TabCompleteEvent instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPartialMessage()Returns the message being partially completed.PlayergetPlayer()Returns the player requesting the tab completion.List<String>getSuggestions()Returns all the suggestions provided to the user, as a mutable list.StringtoString()
-
-
-
Method Detail
-
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
-
getSuggestions
public List<String> getSuggestions()
Returns all the suggestions provided to the user, as a mutable list.- Returns:
- the suggestions
-
-