org.bukkit.event.player
Class PlayerChatTabCompleteEvent

java.lang.Object
  extended by org.bukkit.event.Event
      extended by org.bukkit.event.player.PlayerEvent
          extended by org.bukkit.event.player.PlayerChatTabCompleteEvent

public class PlayerChatTabCompleteEvent
extends PlayerEvent

Called when a player attempts to tab-complete a chat message.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
 
Field Summary
 
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
 
Constructor Summary
PlayerChatTabCompleteEvent(Player who, String message, Collection<String> completions)
           
 
Method Summary
 String getChatMessage()
          Gets the chat message being tab-completed.
static HandlerList getHandlerList()
           
 HandlerList getHandlers()
           
 String getLastToken()
          Gets the last 'token' of the message being tab-completed.
 Collection<String> getTabCompletions()
          This is the collection of completions for this event.
 
Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
 
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerChatTabCompleteEvent

public PlayerChatTabCompleteEvent(Player who,
                                  String message,
                                  Collection<String> completions)
Method Detail

getChatMessage

public String getChatMessage()
Gets the chat message being tab-completed.

Returns:
the chat message

getLastToken

public 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 Collection<String> getTabCompletions()
This is the collection of completions for this event.

Returns:
the current completions

getHandlers

public HandlerList getHandlers()
Specified by:
getHandlers in class Event

getHandlerList

public static HandlerList getHandlerList()


Copyright © 2013. All Rights Reserved.