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

    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

    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.

    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 Details

  • 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

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

      public static HandlerList getHandlerList()