|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bukkit.event.Event
org.bukkit.event.player.PlayerEvent
org.bukkit.event.player.PlayerCommandPreprocessEvent
public class PlayerCommandPreprocessEvent
Called early in the command handling process. This event is only for very exceptional cases and you should not normally use it.
| 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 | |
|---|---|
PlayerCommandPreprocessEvent(Player player,
String message)
|
|
PlayerCommandPreprocessEvent(Player player,
String message,
Set<Player> recipients)
|
|
| Method Summary | |
|---|---|
String |
getFormat()
Deprecated. This method is provided for backward compatibility with no guarantee to the use of the format. |
static HandlerList |
getHandlerList()
|
HandlerList |
getHandlers()
|
String |
getMessage()
Gets the command that the player is attempting to send. |
Set<Player> |
getRecipients()
Deprecated. This method is provided for backward compatibility with no guarantee to the effect of viewing or modifying the set. |
boolean |
isCancelled()
Gets the cancellation state of this event. |
void |
setCancelled(boolean cancel)
Sets the cancellation state of this event. |
void |
setFormat(String format)
Deprecated. This method is provided for backward compatibility with no guarantee to the effect of modifying the format. |
void |
setMessage(String command)
Sets the command that the player will send. |
void |
setPlayer(Player player)
Sets the player that this 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 |
|---|
public PlayerCommandPreprocessEvent(Player player,
String message)
public PlayerCommandPreprocessEvent(Player player,
String message,
Set<Player> recipients)
| Method Detail |
|---|
public boolean isCancelled()
Cancellable
isCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
Cancellable
setCancelled in interface Cancellablecancel - true if you wish to cancel this eventpublic String getMessage()
public void setMessage(String command)
throws IllegalArgumentException
command - New message that the player will send
IllegalArgumentException - if command is null or empty
public void setPlayer(Player player)
throws IllegalArgumentException
player - New player which this event will execute as
IllegalArgumentException - if the player provided is null@Deprecated public String getFormat()
@Deprecated public void setFormat(String format)
format - String.Format compatible format string@Deprecated public Set<Player> getRecipients()
UnsupportedOperationException if the event caller provides an unmodifiable set.
public HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||