API Overview
The XDiscordUltimate API exposes the plugin’s core services — database, events, modules, Discord bot, and optional hooks — so your plugin can read linked-account state, react to verification, and integrate with the running Discord guild.Getting Started
Dependency
XDiscordUltimate is published via JitPack. Add it as aprovided/compileOnly dependency — the plugin ships the implementation at runtime.
Gradle:
Basic Usage
XDiscordUltimate is a singleton. Grab it withXDiscordUltimate.getInstance(), null-check it, then reach for the services you need.
Declare XDiscordUltimate as a
depend or softdepend in your plugin.yml so it loads before your plugin. Without it, getInstance() may return null during onEnable.Core Services
All services hang off the main class via getters:| Getter | Returns | Purpose |
|---|---|---|
getConfigManager() | ConfigManager | Typed access to plugin configuration |
getMessageManager() | MessageManager | Localized message strings |
getDatabaseManager() | DatabaseManager | Link state, tickets, moderation, stats |
getModuleManager() | ModuleManager | Chat bridge, logging, and other modules |
getDiscordManager() | DiscordManager | The running JDA bot and main guild |
getEmbedUtils() | EmbedUtils | Discord embed builders |
getAdminUtils() | AdminUtils | Administrative helpers |
getLuckPerms() | Object (nullable) | LuckPerms provider, if present |
isLuckPermsEnabled() | boolean | Whether LuckPerms was hooked |
isPlaceholderAPIEnabled() | boolean | Whether PlaceholderAPI was hooked |
parsePlaceholders(String, Player) | String | Resolve PAPI placeholders in a string |
getStartTime() | long | Plugin enable time (epoch ms) |
Worked Example: Is a Player Linked?
The most common integration question is “is this Minecraft account linked to Discord?” TheDatabaseManager offers two paths:
- Async (recommended from main thread)
- Sync (only from an async context)
Best Practices
Next Steps
Database API
Link state, tickets, moderation, stats, and raw SQL access.
Event Bus
Listen for
PlayerVerifiedEvent and publish your own events.Placeholders
Expose Discord data to any PlaceholderAPI-compatible plugin.

