Class PrePrivateMessageEvent
java.lang.Object
me.remigio07.chatplugin.api.server.event.chat.PrivateMessageEvent
me.remigio07.chatplugin.api.server.event.chat.PrePrivateMessageEvent
- All Implemented Interfaces:
CancellableEvent
,ChatPluginEvent
,ChatPluginPlayerEvent
,ChatPluginServerPlayerEvent
Represents an event called before a player's private message gets processed.
-
Constructor Summary
ConstructorDescriptionPrePrivateMessageEvent
(ChatPluginServerPlayer player, OfflinePlayer recipient, String privateMessage) Constructs a new pre private message event. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if this event has been cancelled and will not be executed.void
setCancelled
(boolean cancelled) Sets the cancellation state of this event.Methods inherited from class me.remigio07.chatplugin.api.server.event.chat.PrivateMessageEvent
getPlayer, getPrivateMessage, getRecipient
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.remigio07.chatplugin.api.common.event.ChatPluginEvent
call
-
Constructor Details
-
PrePrivateMessageEvent
public PrePrivateMessageEvent(ChatPluginServerPlayer player, OfflinePlayer recipient, String privateMessage) Constructs a new pre private message event.Specify
null
as either the sender or the recipient to indicate the console.- Parameters:
player
- Player involvedrecipient
- Recipient involvedprivateMessage
- Private message involved
-
-
Method Details
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableEvent
Checks if this event has been cancelled and will not be executed.- Specified by:
isCancelled
in interfaceCancellableEvent
- Returns:
- Whether this event is cancelled
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:CancellableEvent
Sets the cancellation state of this event.It will be passed through other registered listeners even if it is cancelled, but it will not be executed.
- Specified by:
setCancelled
in interfaceCancellableEvent
- Parameters:
cancelled
- Whether this event should be cancelled
-