Installation
- Gradle (Kotlin)
- Gradle (Groovy)
- Maven
Check Maven Central for the latest version.
Core Classes
BukkitBootstrap
The main entry point for accessing Bukkit-specific functionality.bedrockAdapter()- Gets the bedrock adapter that hooks into Geyser or FloodgatetriggerListener()- Gets the Bukkit event listener for triggersvolatileCode()- Gets Bukkit’s NMS (Net Minecraft Server) handler
BedrockAdapter
Checks if a player is connecting from a Bedrock Edition client.NMS
Provides access to NMS (version-specific) code with Folia support.getFoliaAdaptedPlayer(Player)- Gets a player instance safe for async access on FoliagetFoliaAdaptedEntity(Entity)- Gets an entity instance safe for async access on FoliagetVersion()- Gets the server’s NMS versionregisterCommand(CommandModule)- Registers a brigadier command
Events
All Bukkit events extendBetterHudEvent and follow standard Bukkit event patterns.
Player Events
HudPlayerJoinEvent
Fired when a player’s HUD data is loaded.HudPlayerQuitEvent
Fired when a player quits and their HUD data is unloaded.HudUpdateEvent
Fired when a player’s HUD is updated.Custom Events
CustomPopupEvent
Fired when a custom popup is displayed to a player.Plugin Events
PluginReloadStartEvent
Fired when BetterHud starts reloading.PluginReloadedEvent
Fired when BetterHud finishes reloading.Triggers
HudBukkitEventTrigger
Wraps Bukkit events for use as HUD triggers.Complete Example
Here’s a complete example plugin using the Bukkit API:See Also
- Standard API - Core API shared across all platforms
- Velocity API - Velocity proxy API
- Fabric API - Fabric server API
- GitHub Example - Full example plugin
