Class PreChatEvent
java.lang.Object
me.remigio07.chatplugin.api.server.event.chat.ChatEvent
me.remigio07.chatplugin.api.server.event.chat.PublicMessageEvent
me.remigio07.chatplugin.api.server.event.chat.PreChatEvent
- All Implemented Interfaces:
CancellableEvent,ChatPluginEvent,ChatPluginPlayerEvent,ChatPluginServerPlayerEvent
Represents an event called before a player's message gets processed.
-
Constructor Summary
ConstructorsConstructorDescriptionPreChatEvent(ChatPluginServerPlayer player, String message, ChatChannel<? extends ChatChannelData> channel) Constructs a new pre chat event. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this event has been cancelled and will not be executed.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.Methods inherited from class me.remigio07.chatplugin.api.server.event.chat.PublicMessageEvent
getChannelMethods inherited from class me.remigio07.chatplugin.api.server.event.chat.ChatEvent
getMessage, getPlayerMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.remigio07.chatplugin.api.common.event.ChatPluginEvent
call
-
Constructor Details
-
PreChatEvent
public PreChatEvent(ChatPluginServerPlayer player, String message, ChatChannel<? extends ChatChannelData> channel) Constructs a new pre chat event.- Parameters:
player- Player involvedmessage- Message involvedchannel- Channel involved
-
-
Method Details
-
isCancelled
public boolean isCancelled()Description copied from interface:CancellableEventChecks if this event has been cancelled and will not be executed.- Specified by:
isCancelledin interfaceCancellableEvent- Returns:
- Whether this event is cancelled
-
setCancelled
public void setCancelled(boolean cancelled) Description copied from interface:CancellableEventSets 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:
setCancelledin interfaceCancellableEvent- Parameters:
cancelled- Whether this event should be cancelled
-