Class MonitorAPI

java.lang.Object
cloud.lumenvm.api.MonitorAPI

public class MonitorAPI extends Object
Used to communicate between the addon and the main plugin.
  • Constructor Details

    • MonitorAPI

      public MonitorAPI(cloud.lumenvm.monitor.Monitor plugin, Map<String,cloud.lumenvm.monitor.Embed> embeds)
      Parameters:
      plugin - main plugin
      embeds - available embeds
  • Method Details

    • fireContent

      public void fireContent(String content, cloud.lumenvm.monitor.Webhook webhook)
      Send messages
      Parameters:
      content - String content
      webhook - Webhook that the content will be sent to
    • fireEmbed

      public void fireEmbed(String embedJson, cloud.lumenvm.monitor.Webhook webhook)
      Send embeds. To load them use getEmbeds().get("my_embed") (a JSON embed has to be in the embeds folder).
      Parameters:
      embedJson - the embed JSON
      webhook - Webhook that the embed will be sent to
    • getPlugin

      public cloud.lumenvm.monitor.Monitor getPlugin()
      Returns:
      the LumenMC Monitor plugin
    • getEmbeds

      public Map<String,cloud.lumenvm.monitor.Embed> getEmbeds()
      Returns:
      the available embeds
    • registerCommand

      public void registerCommand(AddonCommand addonCommand)
      Register commands
      Parameters:
      addonCommand - command you created