Modules
Table of Contents
Module Overview
XDiscordUltimate uses a modular architecture where each feature is implemented as a separate module. This approach provides:
Independent operation: Each module can be enabled/disabled separately
Reduced conflicts: Features don't interfere with each other
Easy customization: Enable only what you need
Improved performance: Unused features don't consume resources
Simplified debugging: Issues are isolated to specific modules
Module Structure
All modules extend the base Module class and implement:
getName()- Module display namegetDescription()- Brief descriptiononEnable()- Initialization logiconDisable()- Cleanup logic
Additional optional methods:
onDiscordReady()- Called when Discord bot connects
Core Modules
1. Chat Bridge Module
Status: Core Module (Always Required)
Description: Bridges chat messages between Minecraft and Discord in real-time
Key Features:
Bidirectional chat synchronization
Webhook mode for player's Minecraft skin avatars (like DiscordSRV)
Plain text mode fallback
Player prefix/suffix support (with LuckPerms)
Mention handling and notifications
Emoji conversion
Typing indicators
Custom message formatting
Bot message filtering
Configuration
How It Works
Minecraft to Discord:
Player sends message in Minecraft
Plugin captures AsyncPlayerChatEvent
Formats message with player's name and skin
Sends via webhook to Discord channel
Discord displays as if player posted directly
Discord to Minecraft:
User sends message in Discord
Plugin captures MessageReceivedEvent
Filters bot messages (if enabled)
Formats for Minecraft chat
Broadcasts to all online players
Commands
In Minecraft: No commands (automatic)
In Discord: No commands (automatic)
Permissions
No specific permissions required
Chat bridge works for all online players
Use LuckPerms integration for prefix/suffix display
Dependencies
Required: Discord bot, configured channel
Optional: LuckPerms (for prefixes), webhooks
2. Server Logging Module
Status: Core Module
Description: Logs Minecraft server events to Discord channels
Key Features:
Player join/leave notifications
Player death messages
Advancement broadcasts
Server start/stop logging
Command usage tracking
Configurable ignored commands
Embed or plain text format
Configuration
Log Events
Server Events:
Server start
Server stop
Reload
Player Events:
First join
Join
Leave
Death
Advancement
Command Events:
All commands (except ignored)
Includes timestamp and player
Dependencies
Required: Discord bot, logs channel
Optional: PlaceholderAPI (for advancement placeholders)
Feature Modules
3. Verification Module
Status: Popular Module
Description: Code-based system to link Discord accounts with Minecraft accounts
Key Features:
Random verification code generation
Time-limited codes (default 5 minutes)
Automatic role assignment
Permission group assignment (with LuckPerms)
Whitelist mode support
Cooldown protection
DM-based code delivery
In-game verification command
Configuration
Verification Process
Discord User:
Runs
/verifyslash commandReceives DM with 6-digit code
Gives code to Minecraft player
Minecraft Player:
Runs
/verify <code>Plugin validates code
Links accounts in database
Assigns Discord role
Adds to permission group (if LuckPerms)
Commands
Discord:
/verify(slash command)Minecraft:
/verify <code>
Database Tables
verified_users- Linked accountsverification_codes- Temporary codes
Permissions
Minecraft:
xdiscord.verify(default: true)
4. Tickets Module
Status: Popular Module
Description: Full-featured support ticket system with Discord integration
Key Features:
Automatic Discord channel creation
Ticket categories
Auto-close after inactivity
Transcript saving
Staff notifications
Player-close permission
Message logging
Configuration
Ticket Flow
Create Ticket:
Player runs
/support <message>Plugin creates ticket in database
Creates Discord channel in category
Notifies staff
Posts ticket creation message
Ticket Conversation:
Player and staff can message
All messages logged to database
Participants receive notifications
Close Ticket:
Staff closes via button
Player can close (if enabled)
Transcript saved (if enabled)
Channel archived/deleted
Commands
Minecraft:
/support <message>
Database Tables
tickets- Ticket recordsticket_messages- Ticket messages
Permissions
Minecraft:
xdiscord.support(default: true)
5. Moderation Module
Status: Popular Module
Description: Synchronized moderation between Minecraft and Discord
Key Features:
Ban synchronization
Chat filtering
Player reporting
Moderation logging
Cooldown protection
Auto-moderation
Configuration
Moderation Features
Reporting System:
Players can report others
Reports sent to moderation channel
Includes timestamps and evidence
Ban Sync:
Bans in Minecraft sync to Discord
Discord bans can trigger Minecraft kicks
Unbans synchronized
Chat Filter:
Auto-moderates filtered words
Can delete messages
Can warn/kick offenders
Commands
Minecraft:
/report <player> <reason>
Database Tables
moderation_logs- All moderation actions
Permissions
Minecraft:
xdiscord.report(default: true)
6. Admin Alerts Module
Status: Utility Module
Description: Monitors server health and sends alerts to Discord
Key Features:
TPS monitoring
RAM usage tracking
Customizable thresholds
DM alerts to admins
Configurable check interval
Configuration
Alert Types
Low TPS:
Triggers when TPS drops below threshold
Alerts sent to channel and DMs
High RAM:
Monitors memory usage percentage
Alerts when exceeding threshold
Custom Checks:
Can be extended for other metrics
Plugin exposes API for custom alerts
Permissions
No specific permissions
Alerts go to configured admins and channel
7. Bot Console Module
Status: Admin Module
Description: Execute Minecraft server commands from Discord
Key Features:
Discord command execution
DM command support (configurable)
Command history
Permission-based access
Safe command filtering
Configuration
Console Commands
Discord:
!tps- View server TPSDiscord:
!list- List online playersDiscord:
!restart- Restart server (if implemented)Discord:
!stop- Stop server
Security
Restricted to allowed roles only
Command prefix prevents accidental execution
Dangerous commands can be whitelisted
Permissions
Discord: Allowed roles configured
Minecraft: Not applicable
8. Announcements Module
Status: Admin Module
Description: Broadcast announcements to both Discord and Minecraft
Key Features:
Cross-platform broadcasting
Scheduled announcements
Custom sounds and titles
Embed formatting
Permission-based
Configuration
Announcement Types
Manual Announcements:
Triggered by command
Sent to both platforms
Scheduled Announcements:
Auto-broadcast at intervals
Can target specific platform
Permission-gated
Commands
Minecraft:
/announce <message>
Permissions
Minecraft:
xdiscord.announce(default: op)
9. Player Stats Module
Status: Tracking Module
Description: Tracks and displays player statistics
Key Features:
Join count tracking
Message count tracking
Death count tracking
Playtime tracking
Last seen timestamps
First join tracking
Configuration
Tracked Statistics
Basic Stats:
Number of joins
Messages sent in chat
Number of deaths
Total playtime (minutes)
Timestamps:
First join date
Last seen date
Commands
Minecraft:
/stats [player]Discord:
/stats [player]
Database Tables
player_stats- Player statistics
Permissions
No specific permissions for viewing own stats
Can view others' stats without permission
10. Server Status Module
Status: Information Module
Description: Auto-updating Discord embed showing server status
Key Features:
Live player count
TPS display
Memory usage
Version information
Uptime tracking
Auto-updating embed
Configuration
Status Information
Server Metrics:
Online players / max players
Current TPS
Memory usage
Server version
Embed Features:
Color-coded status
Auto-updating
Customizable format
Display Channel
Dedicated channel for status embed
Message ID tracked for updates
Automatically creates and updates message
11. Welcome DM Module
Status: Engagement Module
Description: Sends personalized welcome messages to verified Discord users
Key Features:
First-join only option
Verified users only option
Embed or plain text
Customizable fields
Server information
Thumbnail support
Configuration
DM Content
Personalization:
Player name
Minecraft head avatar
Server name
Online player count
Server Information:
IP address
Website
Discord invite
Quick start guide
Dependencies
Required: Discord bot, verified users
Optional: Player heads API
12. Booster Perks Module
Status: Engagement Module
Description: Rewards Discord server boosters with Minecraft perks
Key Features:
Native booster detection
Custom booster role support
Permission group assignment
Automatic sync
Reward commands
Remove commands (when unboosting)
Configuration
Booster Detection
Native Detection:
Uses Discord's
isBoosting()methodMost reliable method
Role-Based Detection:
Custom booster role ID
Additional roles array
Backup if native fails
Reward System
On Boost: Executes reward commands
On Unboost: Executes remove commands
Periodic Sync: Checks every 5 minutes
Dependencies
Required: LuckPerms (for permission groups)
Optional: Custom booster roles
Advanced Modules
13. Leaderboard Module
Status: Gamification Module
Description: Auto-updating leaderboard with interactive buttons
Key Features:
Multiple leaderboard types (KILLS, DEATHS, PLAYTIME, etc.)
Top 10 players display
Interactive buttons
Auto-updating
Color-coded ranking
Configuration
Leaderboard Types
KILLS: Player kill count
DEATHS: Player death count
KD_RATIO: Kills/deaths ratio
PLAYTIME: Total playtime
MOB_KILLS: Mob kill count
MESSAGES: Chat messages sent
Interactive Features
Button to switch between leaderboard types
Auto-refresh on interval
Displays player rank and value
14. Activity Roles Module
Status: Engagement Module
Description: Auto-assigns Discord roles based on Minecraft playtime
Key Features:
Multi-tier role system
Automatic promotion
Playtime tracking
Color-coded roles
Announcement support
Configuration
Tier System
Automatic Promotion:
Calculates total playtime
Assigns appropriate role
Removes lower tier roles
Announces to player
Sync Process:
Runs every 5 minutes
Checks all active players
Updates Discord roles
Sends notifications
15. Voice Channels Module
Status: Advanced Module
Description: Dynamic voice channels and player count status channel
Key Features:
Status channel with live player count
Dynamic voice channel creation
Auto-deletion of empty channels
User limit support
Custom channel naming
Configuration
Voice Channel Features
Status Channel:
Shows player count
Shows TPS
Auto-updates
Voice channel type
Dynamic Channels:
Created when joining hub
Named with prefix + number
Deleted when empty
User limit support
16. Economy Bridge Module
Status: Integration Module
Description: Discord commands for economy integration (requires Vault)
Key Features:
Balance checking
Top players list
Pay command support
Transfer taxes
Currency customization
Configuration
Economy Commands
Discord:
/balance- Check balanceDiscord:
/baltop- Top 10 richest playersDiscord:
/pay <player> <amount>- Transfer money
Dependencies
Required: Vault, Economy plugin (EssentialsX, CMI, etc.)
Module Configuration
Enabling/Disabling Modules
Module Load Order
Core Modules (Always loaded):
Chat Bridge
Server Logging
Feature Modules (Loaded when enabled):
Verification
Tickets
Moderation
Admin Alerts
Bot Console
Announcements
Player Stats
Server Status
Welcome DM
Booster Perks
Advanced Modules (Loaded when enabled):
Leaderboard
Activity Roles
Voice Channels
Economy Bridge
Module Dependencies
Chat Bridge
Discord Bot
LuckPerms, Webhooks
Server Logging
Discord Bot
PlaceholderAPI
Verification
Discord Bot, Database
LuckPerms
Tickets
Discord Bot, Database
-
Moderation
Discord Bot, Database
-
Admin Alerts
-
-
Bot Console
Discord Bot
-
Announcements
Discord Bot
-
Player Stats
Database
-
Server Status
Discord Bot
-
Welcome DM
Discord Bot
Player heads API
Booster Perks
LuckPerms
-
Leaderboard
Database
-
Activity Roles
Database, LuckPerms
-
Voice Channels
Discord Bot
-
Economy Bridge
Vault, Economy Plugin
-
Module Development
Creating a Custom Module
Extend Module class:
Register in ModuleManager:
Add configuration:
Module Best Practices
Configuration:
Always check if enabled before processing
Load configuration in onEnable()
Provide sensible defaults
Discord Integration:
Wait for onDiscordReady() before using Discord
Remove event listeners in onDisable()
Handle missing permissions gracefully
Database Operations:
Use async operations (CompletableFuture)
Always handle SQLExceptions
Close resources properly
Logging:
Use module's built-in logging methods
Include module name in logs
Log at appropriate level (info, warning, severe)
Error Handling:
Never let exceptions crash the plugin
Catch and log errors gracefully
Provide fallback behavior
Troubleshooting
Module Not Working
Check Enabled Status:
Check Configuration:
Verify all required fields are set
Check for typos in channel IDs
Ensure Discord bot has permissions
Check Dependencies:
Verify optional dependencies are installed
Check logs for missing dependency warnings
Check Logs:
Enable debug mode in config
Look for module-specific error messages
Check for stack traces
Module Causes Errors
Check Configuration:
Invalid configuration values
Missing required fields
Wrong data types
Check Permissions:
Discord bot missing channel permissions
Minecraft missing bukkit permissions
Check Dependencies:
Optional dependencies not installed
Version incompatibilities
Module Performance Issues
Check Update Intervals:
Reduce update frequency if too high
Some modules update every second by default
Check Database Queries:
Enable debug mode to see queries
Optimize frequent queries
Add indexes if needed
Check Async Operations:
Ensure long operations are async
Don't block main thread
Use Bukkit scheduler for async tasks
Module Not Loading
Check Module Registration:
Module must be registered in ModuleManager
Check ModuleManager.loadModules()
Check isFeatureEnabled():
Configuration must have
features.<module>.enabled: true
Check for Exceptions:
Errors in onEnable() prevent module loading
Check logs for stack traces
This documentation provides comprehensive coverage of all XDiscordUltimate modules. Each module is designed to work independently while providing powerful features for Discord-Minecraft integration.
Last updated
