Class ExternalMessageEvent
java.lang.Object
org.bukkit.event.Event
io.github.starsdown64.minecord.api.ExternalMessageEvent
- All Implemented Interfaces:
org.bukkit.event.Cancellable
public class ExternalMessageEvent
extends org.bukkit.event.Event
implements org.bukkit.event.Cancellable
Allows external plugins to send message to Discord.
Can be activated with
Bukkit.getPluginManager().callEvent(ExternalMessageEvent)
This event's message cannot be changed once called, it can only be cancelled.- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class org.bukkit.event.Event
org.bukkit.event.Event.Result
-
Constructor Summary
ConstructorDescriptionExternalMessageEvent
(String message) Allows external plugins to send messages to Discord. -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerList
@NotNull org.bukkit.event.HandlerList
Gets the message that will be sent to Discord.boolean
void
setCancelled
(boolean cancel) Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
Constructor Details
-
ExternalMessageEvent
Allows external plugins to send messages to Discord.- Parameters:
message
- the message to be sent.
-
-
Method Details
-
getHandlers
@NotNull public @NotNull org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlers
in classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList() -
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancel) - Specified by:
setCancelled
in interfaceorg.bukkit.event.Cancellable
-
getMessage
Gets the message that will be sent to Discord.- Returns:
- the message to be sent.
-