Package cloud.lumenvm.api
Class MonitorAPI
java.lang.Object
cloud.lumenvm.api.MonitorAPI
Used to communicate between the addon and the main plugin.
-
Constructor Summary
ConstructorsConstructorDescriptionMonitorAPI(cloud.lumenvm.monitor.Monitor plugin, Map<String, cloud.lumenvm.monitor.Embed> embeds) -
Method Summary
Modifier and TypeMethodDescriptionvoidfireContent(String content, cloud.lumenvm.monitor.Webhook webhook) Send messagesvoidSend embeds.cloud.lumenvm.monitor.MonitorvoidregisterCommand(AddonCommand addonCommand) Register commands
-
Constructor Details
-
Method Details
-
fireContent
Send messages- Parameters:
content-Stringcontentwebhook-Webhookthat the content will be sent to
-
fireEmbed
Send embeds. To load them usegetEmbeds().get("my_embed")(a JSON embed has to be in the embeds folder).- Parameters:
embedJson- the embed JSONwebhook-Webhookthat the embed will be sent to
-
getPlugin
public cloud.lumenvm.monitor.Monitor getPlugin()- Returns:
- the LumenMC Monitor plugin
-
getEmbeds
- Returns:
- the available embeds
-
registerCommand
Register commands- Parameters:
addonCommand- command you created
-