Package org.bukkit.event.player
Class PlayerChatTabCompleteEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerChatTabCompleteEvent
public class PlayerChatTabCompleteEvent extends PlayerEvent
Called when a player attempts to tab-complete a chat message.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PlayerChatTabCompleteEvent(Player who, java.lang.String message, java.util.Collection<java.lang.String> completions)
-
Method Summary
Modifier and Type Method Description java.lang.String
getChatMessage()
Gets the chat message being tab-completed.static HandlerList
getHandlerList()
HandlerList
getHandlers()
java.lang.String
getLastToken()
Gets the last 'token' of the message being tab-completed.java.util.Collection<java.lang.String>
getTabCompletions()
This is the collection of completions for this event.
-
Constructor Details
-
PlayerChatTabCompleteEvent
public PlayerChatTabCompleteEvent(Player who, java.lang.String message, java.util.Collection<java.lang.String> completions)
-
-
Method Details
-
getChatMessage
public java.lang.String getChatMessage()Gets the chat message being tab-completed.- Returns:
- the chat message
-
getLastToken
public java.lang.String getLastToken()Gets the last 'token' of the message being tab-completed.The token is the substring starting with the character after the last space in the message.
- Returns:
- The last token for the chat message
-
getTabCompletions
public java.util.Collection<java.lang.String> getTabCompletions()This is the collection of completions for this event.- Returns:
- the current completions
-
getHandlers
- Specified by:
getHandlers
in classEvent
-
getHandlerList
-