Skip to main content

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​

  1. Dual storage: Keep data in a single data.json or in a MySQL/MariaDB database
  2. Export and import: Move all data between JSON and SQL with two commands
  3. Settings menu: Change the main settings in-game with /example admin, no YAML editing
  4. Hot reload: Edits to config.yml and messages.yml apply without a restart
  5. Customizable messages: Every message, sound and title lives in messages.yml
  6. Clickable help: Paginated help menu with a separate admin section
  7. Per-player data: Tracks how often each player has used /example info
  8. 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​

CommandDescriptionPermission
/example or /example help [page]Show the help menuNone
/example infoView your stored datanexalexample.use

Admin Commands​

CommandDescriptionPermission
/example adminOpen the settings menu (console: admin help)nexalexample.admin
/example admin help [page]Show the admin commandsnexalexample.admin
/example admin exportExport all data to export.jsonnexalexample.admin
/example admin importImport all data from export.jsonnexalexample.admin

Permissions​

PermissionDescriptionDefault
nexalexample.useUse /example infotrue
nexalexample.adminSettings menu and all admin commandsop

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​

  1. Run /example admin export
  2. Change storage.type in config.yml
  3. Restart the server
  4. Run /example admin import

Database Schema​

When using SQL storage, the plugin creates the following table:

example_users​

ColumnTypeKeyDescription
idVARCHAR(36)PKPlayer UUID
nameVARCHAR(16)Last known player name
usesINTTimes /example info was used
last_usedBIGINTLast use timestamp (ms)

Key Legend: PK = Primary Key

Installation​

  1. Download the plugin JAR
  2. Place it in the /plugins folder
  3. Start or restart the server
  4. Configure config.yml (changes apply automatically; a storage type change needs a restart)