org.bukkit.event.player
Class PlayerChatEvent

java.lang.Object
  extended by org.bukkit.event.Event
      extended by org.bukkit.event.player.PlayerEvent
          extended by org.bukkit.event.player.PlayerChatEvent
All Implemented Interfaces:
Cancellable

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.

@Deprecated
public class PlayerChatEvent
extends PlayerEvent
implements Cancellable

Holds information for player chat and commands


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
PlayerChatEvent(Player player, String message)
          Deprecated.  
PlayerChatEvent(Player player, String message, String format, Set<Player> recipients)
          Deprecated.  
 
Method Summary
 String getFormat()
          Deprecated. Gets the format to use to display this chat message
static HandlerList getHandlerList()
          Deprecated.  
 HandlerList getHandlers()
          Deprecated.  
 String getMessage()
          Deprecated. Gets the message that the player is attempting to send
 Set<Player> getRecipients()
          Deprecated. Gets a set of recipients that this chat message will be displayed to
 boolean isCancelled()
          Deprecated. Gets the cancellation state of this event.
 void setCancelled(boolean cancel)
          Deprecated. Sets the cancellation state of this event.
 void setFormat(String format)
          Deprecated. Sets the format to use to display this chat message
 void setMessage(String message)
          Deprecated. Sets the message that the player will send
 void setPlayer(Player player)
          Deprecated. Sets the player that this message will display as, or command will be executed as
 
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

PlayerChatEvent

public PlayerChatEvent(Player player,
                       String message)
Deprecated. 

PlayerChatEvent

public PlayerChatEvent(Player player,
                       String message,
                       String format,
                       Set<Player> recipients)
Deprecated. 
Method Detail

isCancelled

public boolean isCancelled()
Deprecated. 
Description copied from interface: Cancellable
Gets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins

Specified by:
isCancelled in interface Cancellable
Returns:
true if this event is cancelled

setCancelled

public void setCancelled(boolean cancel)
Deprecated. 
Description copied from interface: Cancellable
Sets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.

Specified by:
setCancelled in interface Cancellable
Parameters:
cancel - true if you wish to cancel this event

getMessage

public String getMessage()
Deprecated. 
Gets the message that the player is attempting to send

Returns:
Message the player is attempting to send

setMessage

public void setMessage(String message)
Deprecated. 
Sets the message that the player will send

Parameters:
message - New message that the player will send

setPlayer

public void setPlayer(Player player)
Deprecated. 
Sets the player that this message will display as, or command will be executed as

Parameters:
player - New player which this event will execute as

getFormat

public String getFormat()
Deprecated. 
Gets the format to use to display this chat message

Returns:
String.Format compatible format string

setFormat

public void setFormat(String format)
Deprecated. 
Sets the format to use to display this chat message

Parameters:
format - String.Format compatible format string

getRecipients

public Set<Player> getRecipients()
Deprecated. 
Gets a set of recipients that this chat message will be displayed to

Returns:
All Players who will see this chat message

getHandlers

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

getHandlerList

public static HandlerList getHandlerList()
Deprecated. 


Copyright © 2013. All Rights Reserved.