public class SendMessageEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
CommandSender
Constructor and Description |
---|
SendMessageEvent(org.bukkit.command.CommandSender receiver,
java.lang.String messageType,
IMessageComponent messageComponent,
java.lang.Object[] args)
The constructor for the event.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getArgument(int index)
Get an argument of the message.
|
int |
getArgumentsLength()
Get the length of the arguments array.
|
static org.bukkit.event.HandlerList |
getHandlerList() |
org.bukkit.event.HandlerList |
getHandlers() |
IMessageComponent |
getMessageComponent()
Get the message component that is sent.
|
java.lang.String |
getMessageType()
Get the name of the message, similar to the one from lang file.
|
org.bukkit.command.CommandSender |
getReceiver()
Get the receiver of the message.
|
boolean |
isCancelled() |
void |
setArgument(int index,
java.lang.Object value)
Set an argument for the message.
|
void |
setCancelled(boolean cancelled) |
void |
setMessageComponent(IMessageComponent messageComponent)
Set the message component to be sent.
|
public SendMessageEvent(org.bukkit.command.CommandSender receiver, java.lang.String messageType, IMessageComponent messageComponent, java.lang.Object[] args)
receiver
- The receiver of the message.messageType
- The name of the message, similar to the one from lang file.messageComponent
- The message component that is being sent.public org.bukkit.command.CommandSender getReceiver()
public java.lang.String getMessageType()
public java.lang.Object getArgument(int index)
index
- The index of the argument.java.lang.ArrayIndexOutOfBoundsException
- If is out of bounds.public void setArgument(int index, java.lang.Object value)
index
- The index of the argument.value
- The value to be set.java.lang.ArrayIndexOutOfBoundsException
- If is out of bounds.public int getArgumentsLength()
public IMessageComponent getMessageComponent()
public void setMessageComponent(IMessageComponent messageComponent)
messageComponent
- The new component to be sent.public boolean isCancelled()
isCancelled
in interface org.bukkit.event.Cancellable
public void setCancelled(boolean cancelled)
setCancelled
in interface org.bukkit.event.Cancellable
public org.bukkit.event.HandlerList getHandlers()
getHandlers
in class org.bukkit.event.Event
public static org.bukkit.event.HandlerList getHandlerList()