Class ToggleChatMuteEvent
java.lang.Object
me.remigio07.chatplugin.api.server.event.chat.ToggleChatMuteEvent
- All Implemented Interfaces:
CancellableEvent
,ChatPluginEvent
Represents an event called before the chat gets globally (un)muted.
- See Also:
-
Constructor Summary
ConstructorDescriptionToggleChatMuteEvent
(boolean wasChatMuted) Constructs a new toggle chat mute 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.boolean
Checks if the chat was globally muted when this event was called.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
-
ToggleChatMuteEvent
public ToggleChatMuteEvent(boolean wasChatMuted) Constructs a new toggle chat mute event.- Parameters:
wasChatMuted
- Whether the chat was muted
-
-
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
-
wasChatMuted
public boolean wasChatMuted()Checks if the chat was globally muted when this event was called.- Returns:
- Whether the chat was muted
-