Bukkit  1.5.2-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.event.player.PlayerChatEvent Class Reference

Holds information for player chat and commands. More...

+ Inheritance diagram for org.bukkit.event.player.PlayerChatEvent:
+ Collaboration diagram for org.bukkit.event.player.PlayerChatEvent:

Public Member Functions

 PlayerChatEvent (final Player player, final String message)
 
 PlayerChatEvent (final Player player, final String message, final String format, final Set< Player > recipients)
 
boolean isCancelled ()
 
void setCancelled (boolean cancel)
 
String getMessage ()
 Gets the message that the player is attempting to send.
 
void setMessage (String message)
 Sets the message that the player will send.
 
void setPlayer (final Player player)
 Sets the player that this message will display as, or command will be executed as.
 
String getFormat ()
 Gets the format to use to display this chat message.
 
void setFormat (final String format)
 Sets the format to use to display this chat message.
 
Set< PlayergetRecipients ()
 Gets a set of recipients that this chat message will be displayed to.
 
HandlerList getHandlers ()
 
- Public Member Functions inherited from org.bukkit.event.player.PlayerEvent
 PlayerEvent (final Player who)
 
final Player getPlayer ()
 Returns the player involved in this event.
 
- Public Member Functions inherited from org.bukkit.event.Event
 Event ()
 The default constructor is defined for cleaner code.
 
 Event (boolean isAsync)
 This constructor is used to explicitly declare an event as synchronous or asynchronous.
 
String getEventName ()
 Convenience method for providing a user-friendly identifier.
 
final boolean isAsynchronous ()
 Any custom event that should not by synchronized with other events must use the specific constructor.
 
- Public Member Functions inherited from org.bukkit.event.Cancellable
boolean isCancelled ()
 Gets the cancellation state of this event.
 
void setCancelled (boolean cancel)
 Sets the cancellation state of this event.
 

Static Public Member Functions

static HandlerList getHandlerList ()
 

Additional Inherited Members

- Protected Attributes inherited from org.bukkit.event.player.PlayerEvent
Player player
 

Detailed Description

Holds information for player chat and commands.

Deprecated:
This event will fire from the main thread and allows the use of all of the Bukkit API, unlike the AsyncPlayerChatEvent.

Listening to this event forces chat to wait for the main thread which causes delays for chat.
AsyncPlayerChatEvent is the encouraged alternative for thread safe implementations.

Definition at line 22 of file PlayerChatEvent.java.

Constructor & Destructor Documentation

org.bukkit.event.player.PlayerChatEvent.PlayerChatEvent ( final Player  player,
final String  message 
)
org.bukkit.event.player.PlayerChatEvent.PlayerChatEvent ( final Player  player,
final String  message,
final String  format,
final Set< Player recipients 
)

Definition at line 36 of file PlayerChatEvent.java.

Member Function Documentation

String org.bukkit.event.player.PlayerChatEvent.getFormat ( )

Gets the format to use to display this chat message.

Returns
String.Format compatible format string

Definition at line 85 of file PlayerChatEvent.java.

static HandlerList org.bukkit.event.player.PlayerChatEvent.getHandlerList ( )
static

Definition at line 120 of file PlayerChatEvent.java.

HandlerList org.bukkit.event.player.PlayerChatEvent.getHandlers ( )
virtual

Implements org.bukkit.event.Event.

Definition at line 116 of file PlayerChatEvent.java.

String org.bukkit.event.player.PlayerChatEvent.getMessage ( )

Gets the message that the player is attempting to send.

Returns
Message the player is attempting to send

Definition at line 56 of file PlayerChatEvent.java.

Set<Player> org.bukkit.event.player.PlayerChatEvent.getRecipients ( )

Gets a set of recipients that this chat message will be displayed to.

Returns
All Players who will see this chat message

Definition at line 111 of file PlayerChatEvent.java.

boolean org.bukkit.event.player.PlayerChatEvent.isCancelled ( )

Definition at line 43 of file PlayerChatEvent.java.

void org.bukkit.event.player.PlayerChatEvent.setCancelled ( boolean  cancel)

Definition at line 47 of file PlayerChatEvent.java.

void org.bukkit.event.player.PlayerChatEvent.setFormat ( final String  format)

Sets the format to use to display this chat message.

Parameters
formatString.Format compatible format string

Definition at line 94 of file PlayerChatEvent.java.

void org.bukkit.event.player.PlayerChatEvent.setMessage ( String  message)

Sets the message that the player will send.

Parameters
messageNew message that the player will send

Definition at line 65 of file PlayerChatEvent.java.

void org.bukkit.event.player.PlayerChatEvent.setPlayer ( final Player  player)

Sets the player that this message will display as, or command will be executed as.

Parameters
playerNew player which this event will execute as

Definition at line 75 of file PlayerChatEvent.java.


The documentation for this class was generated from the following file: