Config.yml
The config.yml file is the main configuration file for zMenu. It controls global plugin settings, database configuration, performance options, and more.
File Location
plugins/zMenu/config.yml
Complete Configuration Reference
#######################################
# Debug Settings #
#######################################
# Enable debug messages in console
enable-debug: false
# Enable debug timing information
enable-debug-time: false
#######################################
# Storage Settings #
#######################################
# Storage type for player data
# Options: SQLITE, MYSQL, MARIADB, NONE
storage-type: SQLITE
# Database configuration (for MySQL/MariaDB)
database-configuration:
table-prefix: "zmenu_"
host: "localhost"
port: 3306
user: "username"
password: "password"
database: "zmenu"
#######################################
# Formatting Settings #
#######################################
# Enable MiniMessage format (Paper/Purpur only)
# This allows modern formatting like <gradient:red:blue>
enable-mini-message-format: true
#######################################
# Performance Settings #
#######################################
# Cache item stacks for better performance
enable-cache-item-stack: true
# Enable PlaceholderAPI caching
enable-cache-placeholder-api: false
# PlaceholderAPI cache duration (ticks, 20 = 1 second)
cache-placeholder-api: 20
# Cache offline player data (seconds)
cache-offline-player: 300
#######################################
# Click Settings #
#######################################
# Enable click cooldown to prevent spam clicking
enable-cooldown-click: true
# Cooldown duration (milliseconds)
cooldown-click-milliseconds: 100
#######################################
# Security Settings #
#######################################
# Enable anti-dupe protection
enable-anti-dupe: true
# Log when players open inventories
enable-player-open-inventory-logs: true
#######################################
# Menu Settings #
#######################################
# Default main menu inventory name
main-menu: "example"
# Use swap item offhand key (F) to open main menu
use-swap-item-off-hand-key-to-open-main-menu: false
Configuration Options Explained
Debug Settings
enable-debug
Enables detailed debug messages in the console. Useful for troubleshooting issues.
enable-debug: false
When to enable:
- Troubleshooting inventory loading issues
- Debugging placeholder problems
- Reporting bugs to the developer
enable-debug-time
Shows timing information for operations.
enable-debug-time: false
Storage Settings
storage-type
Determines how player data is stored.
| Type | Description |
|---|---|
SQLITE | Local file-based database (default) |
MYSQL | MySQL server |
MARIADB | MariaDB server |
NONE | No persistent storage |
storage-type: SQLITE
Recommendations:
- Single server: Use
SQLITE - Network/BungeeCord: Use
MYSQLorMARIADB - No player data needed: Use
NONE
database-configuration
MySQL/MariaDB connection settings.
database-configuration:
table-prefix: "zmenu_"
host: "localhost"
port: 3306
user: "minecraft"
password: "secure_password"
database: "minecraft_db"
| Option | Description |
|---|---|
table-prefix | Prefix for database tables |
host | Database server address |
port | Database port (default: 3306) |
user | Database username |
password | Database password |
database | Database name |
Formatting Settings
enable-mini-message-format
Enables MiniMessage formatting for text. Only works on Paper/Purpur/Pufferfish.
enable-mini-message-format: true
When enabled, you can use:
name: "<gradient:red:blue>Gradient Text</gradient>"
lore:
- "<rainbow>Rainbow!</rainbow>"
- "<bold><gold>Bold gold</gold></bold>"
Performance Settings
enable-cache-item-stack
Caches created ItemStacks to improve performance.
enable-cache-item-stack: true
Recommendation: Keep enabled unless you experience issues.
enable-cache-placeholder-api
Caches PlaceholderAPI results to reduce parsing overhead.
enable-cache-placeholder-api: false
Enabling this means placeholders won't update instantly. Use with caution.
cache-placeholder-api
Duration to cache placeholder results (in ticks).
cache-placeholder-api: 20 # 1 second
cache-offline-player
How long to cache offline player data (seconds).
cache-offline-player: 300 # 5 minutes
Click Settings
enable-cooldown-click
Prevents spam clicking by adding a cooldown between clicks.
enable-cooldown-click: true
cooldown-click-milliseconds
The cooldown duration between clicks.
cooldown-click-milliseconds: 100 # 0.1 seconds
Adjust based on your needs:
- Lower = More responsive, risk of accidental double-clicks
- Higher = Safer, might feel sluggish
Security Settings
enable-anti-dupe
Enables the anti-item-duplication system.
enable-anti-dupe: true
This detects and prevents common item duplication exploits involving inventory GUIs.
enable-player-open-inventory-logs
Logs when players open zMenu inventories.
enable-player-open-inventory-logs: true
Useful for:
- Monitoring player activity
- Debugging issues
- Security auditing
Menu Settings
main-menu
The default inventory opened by the MAIN_MENU button type and the F key shortcut.
main-menu: "example"
This should match an inventory filename (without .yml) in your inventories/ folder.
use-swap-item-off-hand-key-to-open-main-menu
Allow players to press F (swap offhand key) to open the main menu.
use-swap-item-off-hand-key-to-open-main-menu: false
When to enable:
- You want easy menu access without commands
- Your server has a main hub menu
When to keep disabled:
- Players need the F key for actual item swapping
- You use custom resource packs with F key bindings
Example Configurations
Basic Server (SQLite)
enable-debug: false
storage-type: SQLITE
enable-mini-message-format: true
enable-cache-item-stack: true
enable-anti-dupe: true
enable-cooldown-click: true
cooldown-click-milliseconds: 100
main-menu: "main"
Network Server (MySQL)
enable-debug: false
storage-type: MYSQL
database-configuration:
table-prefix: "zmenu_"
host: "mysql.mynetwork.com"
port: 3306
user: "zmenu_user"
password: "secure_password_here"
database: "minecraft_network"
enable-mini-message-format: true
enable-cache-item-stack: true
enable-cache-placeholder-api: true
cache-placeholder-api: 40
enable-anti-dupe: true
main-menu: "hub_menu"
Performance-Focused
enable-debug: false
storage-type: SQLITE
enable-cache-item-stack: true
enable-cache-placeholder-api: true
cache-placeholder-api: 60
cache-offline-player: 600
enable-cooldown-click: true
cooldown-click-milliseconds: 150
Development/Testing
enable-debug: true
enable-debug-time: true
storage-type: SQLITE
enable-cache-item-stack: false
enable-cache-placeholder-api: false
enable-cooldown-click: false
enable-player-open-inventory-logs: true
Reloading Configuration
After making changes:
/zm reload config
Or reload everything:
/zm reload
Database configuration changes require a server restart to take effect.
Best Practices
- Start with defaults: Only change what you need
- Enable caching on large servers: Improves performance
- Use MySQL for networks: Allows data sharing across servers
- Keep anti-dupe enabled: Protects your economy
- Test debug mode: Useful when setting up, disable in production
- Set appropriate click cooldown: Balance responsiveness and safety
Troubleshooting
Database Connection Failed
- Verify credentials are correct
- Check database server is running
- Ensure the database exists
- Check firewall allows connections
- Verify user has proper permissions
Placeholders Not Updating
- Disable placeholder caching temporarily
- Check if PlaceholderAPI is installed
- Verify the expansion is downloaded
Performance Issues
- Enable item stack caching
- Enable placeholder caching
- Increase click cooldown
- Check for inventory loops (A opens B opens A)
Next Steps
- Set up Custom Commands
- Configure Player Data storage
- Learn about the Development API