Interface PluginBootstrap


@OverrideOnly @Experimental public interface PluginBootstrap
A plugin boostrap is meant for loading certain parts of the plugin before the server is loaded.

Plugin bootstrapping allows values to be initialized in certain parts of the server that might not be allowed when the server is running.

Your bootstrap class will be on the same classloader as your JavaPlugin.

All calls to Bukkit may throw a NullPointerExceptions or return null unexpectedly. You should only call api methods that are explicitly documented to work in the bootstrapper

  • Method Details

    • bootstrap

      void bootstrap(@NotNull @NotNull PluginProviderContext context)
      Called by the server, allowing you to bootstrap the plugin with a context that provides things like a logger and your shared plugin configuration file.
      Parameters:
      context - the server provided context
    • createPlugin

      Called by the server to instantiate your main class. Plugins may override this logic to define custom creation logic for said instance, like passing addition constructor arguments.
      Parameters:
      context - the server created bootstrap object
      Returns:
      the server requested instance of the plugins main class.