A lightweight Paper/Spigot plugin that provides placeholders for the Quests Plugin to generate a leaderboard.
- Real-time Leaderboard: Automatically updates player rankings based on completed quests
- MySQL Database Integration: Uses HikariCP connection pooling for efficient database operations
- PlaceholderAPI Support: Provides flexible placeholders for use in scoreboards, chat, TAB lists, and more
- Configurable: Customizable update intervals, leaderboard size, and database timeouts
- Performance Optimized: Asynchronous database queries prevent server lag
- Reload Command: Update configuration without restarting the server
- Minecraft Server: Paper 1.21.10+ (or compatible Spigot/Bukkit fork)
- Java: Java 21 or higher
- Required Dependencies:
- Database: MySQL 5.7+ or MariaDB 10.2+
- Download the latest
quests-leaderboard-X.X.jarfrom the Releases page - Place the JAR file in your server's
plugins/folder - Install PlaceholderAPI if not already installed
- Start your server to generate the default configuration
- Configure the database settings in
plugins/QuestsLeaderboard/config.yml - Restart the server or use
/questleaderboard reload
database:
host: "127.0.0.1"
port: 3306
user: "root"
password: "password"
database: "minecraft"
# Connection pool settings
connection-timeout: 30000 # Maximum time to wait for a connection from pool (in ms, default: 30s)
max-lifetime: 1800000 # Maximum lifetime of a connection in the pool (in ms, default: 30min)
settings:
update-interval: 300 # in seconds (5 minutes)
query-timeout: 10 # Maximum time for a single query to execute (in seconds, default: 10s)
leaderboard-size: 10 # Number of top players to display (default: 10)| Option | Description | Default |
|---|---|---|
database.host |
MySQL server hostname or IP address | 127.0.0.1 |
database.port |
MySQL server port | 3306 |
database.user |
Database username | root |
database.password |
Database password | password |
database.database |
Database name | minecraft |
database.connection-timeout |
Max wait time for connection from pool (ms) | 30000 |
database.max-lifetime |
Max lifetime of a connection in pool (ms) | 1800000 |
settings.update-interval |
How often to refresh the leaderboard (seconds) | 300 |
settings.query-timeout |
Max execution time for database queries (seconds) | 10 |
settings.leaderboard-size |
Number of top players to track | 10 |
The plugin provides the following PlaceholderAPI placeholders:
Returns only the player's name for a specific rank.
%questleaderboard_top_1_name%
%questleaderboard_top_2_name%
...
%questleaderboard_top_10_name%
Output Example: Steve
Returns only the number of completed quests for a specific rank.
%questleaderboard_top_1_quests%
%questleaderboard_top_2_quests%
...
%questleaderboard_top_10_quests%
Output Example: 42
- If a rank doesn't exist (e.g., only 5 players but requesting
top_10):--- - If an invalid rank is requested:
Invalid Rank - If an invalid placeholder format is used:
Invalid Placeholder
- "&6&lTop Quest Players"
- "&e#1 &f%questleaderboard_top_1_name% &7- &a%questleaderboard_top_1_quests%"
- "&e#2 &f%questleaderboard_top_2_name% &7- &a%questleaderboard_top_2_quests%"
- "&e#3 &f%questleaderboard_top_3_name% &7- &a%questleaderboard_top_3_quests%"/papi bcparse --null Congratulations to our top player: %questleaderboard_top_1_name% with %questleaderboard_top_1_quests% completed quests!
Reloads the plugin configuration and forces an immediate leaderboard update.
Permission: questleaderboard.reload
| Permission | Description | Default |
|---|---|---|
questleaderboard.use |
Allows using the /questleaderboard command |
op |
questleaderboard.reload |
Allows reloading the plugin configuration | op |
- Java 21 JDK
- Maven 3.8+ (Apache Maven)
- Git (optional, for cloning)
- Clone the repository:
git clone https://github.com/tino-id/quest-leaderboard.git
cd quests-leaderboard- Build with Maven:
mvn clean package- Find the compiled JAR:
target/quests-leaderboard-X.X.X.jar
Problem: Server shows Could not load 'plugins/quests-leaderboard-X.X.jar'
Solution:
- Ensure you're running Java 21 or higher:
/version - Check that PlaceholderAPI is installed and enabled
- Verify the plugin file isn't corrupted (re-download if necessary)
Problem: Could not connect to database! in console
Solutions:
- Verify credentials in
config.ymlmatch your MySQL server - Check MySQL is running:
systemctl status mysql(Linux) or Task Manager (Windows) - Test connection manually:
mysql -h 127.0.0.1 -u root -p minecraft- Check firewall rules if MySQL is on a remote server
- Increase connection timeout in config if network is slow
Problem: Placeholders display --- instead of player data
Possible Causes:
- Not enough players in the database (e.g., requesting
top_10but only 5 players exist) - Database tables are empty
- Leaderboard hasn't updated yet (wait for next update interval)
Solutions:
- Force an update:
/questleaderboard reload - Check database has quest completion data
- Verify the SQL query returns results (run manually in MySQL)
Problem: Placeholders show as raw text %questleaderboard_top_1_name%
Solutions:
- Install PlaceholderAPI if not present
- Reload PlaceholderAPI:
/papi reload - Re-register expansion:
/questleaderboard reload - Check plugin load order - ensure PlaceholderAPI loads before QuestsLeaderboard
- Verify placeholder syntax - use
/papi parse me %questleaderboard_top_1_name%to test
- ✅ Paper 1.21.X
⚠️ Spigot 1.21.x (should work, not extensively tested)- ❌ 1.20.x and below (not supported)
- Check this README for common issues
- Search existing issues on GitHub
- Create a new issue with full details:
- Server version (
/version) - Plugin version
- Full error logs
- Configuration file
- Server version (
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
When reporting bugs, include:
- Server Version: Output of
/version - Plugin Version: Check plugin JAR name or
/plugins - Java Version: Output of
java -version - Error Logs: Full stack trace from console
- Steps to Reproduce: Detailed steps
- Expected Behavior: What should happen
- Actual Behavior: What actually happens
This project is licensed under the MIT License - see the LICENSE file for details.
- HikariCP: Fast, simple, reliable connection pooling
- PlaceholderAPI: Flexible placeholder framework
- Paper Project: High-performance Minecraft server
- Quests: Quest plugin for Minecraft
Made with ❤️ for the Minecraft community