Interface ChameleonPlatformExtension


  • public interface ChameleonPlatformExtension
    Chameleon platform extension.

    Classes implementing this interface must also implement T.

    See Also:
    ChameleonExtension
    • Method Detail

      • init

        void init​(@NotNull
                  @NotNull ChameleonLogger logger,
                  @NotNull
                  @NotNull EventBus eventBus)
           throws ChameleonExtensionException
        Extension init.

        This method will be called when the Extension is initialised by Chameleon, either before Chameleon is constructed, or when EventManager#loadExtension is called.

        Parameters:
        logger - Logger.
        eventBus - Event bus.
        Throws:
        ChameleonExtensionException
      • load

        void load​(@NotNull
                  @NotNull Chameleon chameleon)
        Extension load.

        This method will be called when Chameleon has finished loading, or when EventManager#loadExtension is called after Chameleon has loaded.

        If your extension is platform dependant, then you can cast chameleon to the platform Chameleon implementation, e.g. BukkitChameleon, BungeeCordChameleon, etc.

        Parameters:
        chameleon - Chameleon instance.