Interface BuildMcAPI


@NonExtendable public interface BuildMcAPI
The primary API interface for BuildMC.

External plugins can use this interface to interact with BuildMC's core systems, access registries, modify behaviour, and hook into extension points.

  • Method Details

    • tryLoadAPI

      @Nullable static @Nullable BuildMcAPI tryLoadAPI()
      Tries to get the BuildMcAPI service from Bukkit.

      This is required to merge the classpath of the API with our plugin to use our API in your plugin.

      This will crash your plugin if the BuildMC-Core is not loaded before your extension.
      Returns:
      The BuildMcAPI instance or null if not loaded.
    • getPlugin

      @NotNull @NotNull org.bukkit.plugin.Plugin getPlugin()
      Gets the Bukkit plugin instance of BuildMC.
      Returns:
      the plugin instance
    • editConfiguration

      void editConfiguration(@NotNull @NotNull Consumer<org.bukkit.configuration.file.FileConfiguration> consumer)
      Uses a Consumer to change the contents of the core configuration before the core plugin finishes loading.
      Parameters:
      consumer - A consumer to apply changes to the core configuration
    • getSoundManager

      @NotNull @NotNull SoundManager getSoundManager()
      Gets the SoundManager
      Returns:
      the SoundManager instance
    • getClaimManager

      ClaimManager getClaimManager()
      Gets the ClaimManager
      Returns:
      the ClaimManager instance
    • getEndManager

      EndManager getEndManager()
      Gets the EndManager
      Returns:
      the EndManager instance
    • getElytraManager

      ElytraManager getElytraManager()
      Gets the ElytraManager
      Returns:
      the ElytraManager instance
    • getStatusManager

      StatusManager getStatusManager()
      Gets the StatusManager
      Returns:
      the ElytraManager instance
    • getRegistriesHolder

      @NotNull @NotNull RegistriesHolder getRegistriesHolder()
      Gets the shared RegistriesHolder that contains all custom registries shared over all plugins that use the BuildMC-API.

      This can be used to store a reference to any type that implements Bukkit's Registry interface.

      Returns:
      The shared RegistriesHolder instance of the Core
    • getPermissionManager

      PermissionManager getPermissionManager()
      Returns:
      the PermissionManager instance