Package net.mathias2246.buildmc.api
Interface BuildMcAPI
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 behavior, 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 the ClaimManagerGets the ElytraManagerGets the EndManager@NotNull MainClassGets the main class instance of BuildMC.@NotNull org.bukkit.plugin.PluginGets the Bukkit plugin instance of BuildMC.@NotNull RegistriesHolder@NotNull SoundManagerGets the SoundManager used by BuildMC.static @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
void editConfiguration(@NotNull @NotNull Consumer<org.bukkit.configuration.file.FileConfiguration> consumer) Uses aConsumerto change the contents of the core configuration before the core plugin finishes loading.- Parameters:
consumer- A consumer to apply changes to the core configuration
-
getMainClass
Gets the main class instance of BuildMC.- Returns:
- the main class instance
-
getSoundManager
Gets the SoundManager used by BuildMC.- 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() -
getRegistriesHolder
-