de.stefan1200.jts3servermod.interfaces

## Interface HandleBotEvents

-     public interface HandleBotEvents

  This is the main interface, every plugin has to implement it!
  The author of the JTS3ServerMod is not responsible for any damage or data loss!
  E-Mail:
  info@stefan1200.de
  Homepage:
  http://www.stefan1200.de
  Author:
    Stefan Martens

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activate()` This method will be called after connected successfully to the TS3 server after calling handleOnBotConnect(), after reloading configuration or after receiving the function/plugin activate request by bot admin.
    `void` | `disable()` This method will be called while disconnecting from TS3 server, before reloading the configuration or after receiving the function/plugin disable request by bot admin.
    `int` | `getAPIBuild()` On loading all functions/plugins this method will be called to know, if the api build of the plugin match with the JTS3ServerMod.
    `String` | `getCopyright()` The plugin name and copyright.
    `void` | `handleAfterCacheUpdate()` This method will be called after updating the server info, server group list or channel list cache.
    `void` | `handleOnBotConnect()` This method will be called after the JTS3ServerMod connected successfully to the TS3 server.
    `void` | `initClass(JTS3ServerMod_Interface modClass, JTS3ServerQuery queryLib, String prefix)` This method will be called while loading all functions/plugins.
    `boolean` | `multipleInstances()` On loading all functions/plugins this method will be called to know, if multiple instances of this function/plugin per virtual bot are allowed.
    `void` | `unload()` This method will be called while disconnecting from TS3 server after calling disable().

- - ### Method Detail

    - #### activate

          void activate()

      This method will be called after connected successfully to the TS3 server after calling handleOnBotConnect(), after reloading configuration or after receiving the function/plugin activate request by bot admin. Use this method if you have to start a timer or something similar to start the job of this function/plugin.

    - #### disable

          void disable()

      This method will be called while disconnecting from TS3 server, before reloading the configuration or after receiving the function/plugin disable request by bot admin. Use this method if you have to stop a timer or something similar to sleep this function/plugin. Plugin keeps loaded in memory, but should do nothing.

    - #### getAPIBuild

          int getAPIBuild()

      On loading all functions/plugins this method will be called to know, if the api build of the plugin match with the JTS3ServerMod.
      Returns:
        Returns the api build, for which this plugin was compiled against.

    - #### getCopyright

          String getCopyright()

      The plugin name and copyright.
      Returns:
        Returns the copyright line of the plugin.

    - #### handleAfterCacheUpdate

          void handleAfterCacheUpdate()

      This method will be called after updating the server info, server group list or channel list cache. Use this method to update Server, Server Group or Channel information.

    - #### handleOnBotConnect

          void handleOnBotConnect()

      This method will be called after the JTS3ServerMod connected successfully to the TS3 server. Use this method to output a description message to the log. Important: This method never gets called if the function is disabled at bot connect!

    - #### initClass

          void initClass(JTS3ServerMod_Interface modClass,
                         JTS3ServerQuery queryLib,
                         String prefix)

      This method will be called while loading all functions/plugins. Save class instances and plugin prefix to interact with the bot and TS3 server.
      Parameters:
        `modClass` - Main bot class
        `queryLib` - Query connection used by the main bot class
        `prefix` - This is the prefix for config keys and chat commands.

    - #### multipleInstances

          boolean multipleInstances()

      On loading all functions/plugins this method will be called to know, if multiple instances of this function/plugin per virtual bot are allowed.
      Returns:
        `true` if multiple instances are allowed, `false` if not.

    - #### unload

          void unload()

      This method will be called while disconnecting from TS3 server after calling disable(). Use this method if you have to clean up stuff to unload this function/plugin from memory.