Nexal Example
Nexal Example is a Nexal Studios plugin with per-player data stored in JSON or SQL, an in-game settings menu, fully customizable messages and a paginated help menu.
Features
- Dual storage: Keep data in a single
data.jsonor in a MySQL/MariaDB database - Export and import: Move all data between JSON and SQL with two commands
- Settings menu: Change the main settings in-game with
/example admin, no YAML editing - Hot reload: Edits to
config.ymlandmessages.ymlapply without a restart - Customizable messages: Every message, sound and title lives in
messages.yml - Clickable help: Paginated help menu with a separate admin section
- Per-player data: Tracks how often each player has used
/example info - Cooldown: Configurable wait between uses of
/example info
Technologies
- Paper API 1.20.1+: Minecraft server API (Spigot compatible)
- Utilizer: Configuration, messages, items, GUIs
- ACF: Command framework
- nexal-core: JSON and SQL persistence (MariaDB/MySQL), help menu, licensing
Commands
Player Commands
| Command | Description | Permission |
|---|---|---|
/example or /example help [page] | Show the help menu | None |
/example info | View your stored data | nexalexample.use |
Admin Commands
| Command | Description | Permission |
|---|---|---|
/example admin | Open the settings menu (console: admin help) | nexalexample.admin |
/example admin help [page] | Show the admin commands | nexalexample.admin |
/example admin export | Export all data to export.json | nexalexample.admin |
/example admin import | Import all data from export.json | nexalexample.admin |
Permissions
| Permission | Description | Default |
|---|---|---|
nexalexample.use | Use /example info | true |
nexalexample.admin | Settings menu and all admin commands | op |
Configuration
config.yml
# Storage settings
storage:
type: json # json or sql
sql:
host: localhost
port: 3306
database: minecraft
username: root
password: ""
settings:
# Whether players can use /example info
enabled: true
# Seconds between uses of /example info (0 = no cooldown)
cooldown: 5
Both settings can also be changed in-game with /example admin.
messages.yml
All messages are fully customizable with MiniMessage colors and gradients, sounds and titles. The color reference at the top of the file lists every gradient used, so colors can be changed with find-and-replace.
Moving between JSON and SQL
- Run
/example admin export - Change
storage.typeinconfig.yml - Restart the server
- Run
/example admin import
Database Schema
When using SQL storage, the plugin creates the following table:
example_users
| Column | Type | Key | Description |
|---|---|---|---|
id | VARCHAR(36) | PK | Player UUID |
name | VARCHAR(16) | Last known player name | |
uses | INT | Times /example info was used | |
last_used | BIGINT | Last use timestamp (ms) |
Key Legend: PK = Primary Key
Installation
- Download the plugin JAR
- Place it in the
/pluginsfolder - Start or restart the server
- Configure
config.yml(changes apply automatically; a storage type change needs a restart)