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 Summary
Modifier and TypeMethodDescriptionvoideditConfiguration(@NotNull Consumer<org.bukkit.configuration.file.FileConfiguration> consumer) Uses aConsumerto change the contents of the core configuration before the core plugin finishes loading.Gets theClaimManagerGets theElytraManagerGets theEndManagerGets thePermissionManager@NotNull org.bukkit.plugin.PluginGets the Bukkit plugin instance of BuildMC.@NotNull RegistriesHolderGets the sharedRegistriesHolderthat contains all custom registries shared over all plugins that use the BuildMC-API.@NotNull SoundManagerGets theSoundManagerGets theStatusManagerstatic @Nullable BuildMcAPITries to get the BuildMcAPI service from Bukkit.
-
Method Details
-
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
BuildMcAPIinstance ornullif not loaded.
-
getPlugin
@NotNull @NotNull org.bukkit.plugin.Plugin getPlugin()Gets the Bukkit plugin instance of BuildMC.- Returns:
- the plugin instance
-
editConfiguration
-
getSoundManager
Gets theSoundManager- Returns:
- the SoundManager instance
-
getClaimManager
-
getEndManager
-
getElytraManager
-
getStatusManager
-
getRegistriesHolder
Gets the sharedRegistriesHolderthat 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
Registryinterface.- Returns:
- The shared
RegistriesHolderinstance of the Core
-
getPermissionManager
PermissionManager getPermissionManager()Gets thePermissionManager- Returns:
- the PermissionManager instance
-