
MysticLib
Core shared library for all Mystic Minecraft plugins — provides database pooling, logging, plugin registry, and utilities.
6
0
🔮 MysticLib
Core shared library for all Mystic Minecraft plugins — provides database pooling, logging, plugin registry, and utilities.
Features
- 🗄️ Shared Database Pool — HikariCP connection pool shared across all Mystic plugins. Configure once, use everywhere.
- 📝 Logging — console output with log levels (
info,warn,error,success). - 📋 Plugin Registry — Centralized startup display showing all registered Mystic plugins with version and load time.
Requirements
| Requirement | Version |
|---|---|
| Paper / Purpur | 1.21.x+ |
| Java | 21+ |
| MySQL / MariaDB | 5.7+ / 10.2+ (optional, runs in memory-only mode if disabled) |
Installation
- Download the latest
MysticLib-x.x.x.jarfrom Releases. - Place it in your server's
plugins/folder. - Start the server — MysticLib loads first automatically (
load: STARTUP). - Configure database settings in
plugins/MysticLib/config.yml. - Restart the server.
Configuration
The default config is generated at plugins/MysticLib/config.yml:
Note: All Mystic plugins (MysticPlaceholders, etc.) share this single connection pool. You only configure the database once here.
Commands
| Command | Description | Permission |
|---|---|---|
/mysticlib reload | Reload configuration | mysticlib.admin |
/mysticlib status | Show database status and registered plugins | mysticlib.admin |
Aliases: /mlib
API Reference
| Class | Key Methods |
|---|---|
MysticLib | getInstance(), getDatabaseManager(), getPluginRegistry(), isDatabaseEnabled() |
DatabaseManager | getConnection(), executeAsync(), queryAsync(), isConnected(), shutdown() |
PluginRegistry | register(), unregister(), getRegisteredPlugins(), isRegistered() |
MysticLogger | info(), warn(), error(), success(), printPluginInfo() |
ColorUtil | gradient(), mysticGradient(), parse(), gradientComponent(), legacyToMiniMessage() |
Создатели
Детали
Лицензия:MIT
Опубликован:1 месяц назад
Обновлён:1 месяц назад
