JM-AdminMenu uses a MySQL/MariaDB database (via oxmysql) to persist all admin actions, bans, warnings, kicks, and player notes.
Tables#
| Table | Purpose |
|---|---|
jm_bans | All player bans, permanent and temporary |
jm_kicks | Record of every kick action |
jm_warnings | Player warnings with auto-ban threshold |
jm_admin_logs | Full audit log of every admin action |
jm_player_notes | Notes added to player profiles |
jm_screenshots | Screenshot evidence storage |
jm_whitelist | Optional whitelist system |
jm_commendations | Positive recognition records |
jm_admin_sessions | Admin activity session tracking |
Views#
| View | Description |
|---|---|
v_active_bans | All currently active bans with status labels |
v_player_history | Combined history of all actions against a player |
v_admin_activity | Per-admin action statistics |
Key Behaviours#
- Automatic ban checking: When a player connects, the system queries
jm_bansand drops the player immediately if an active ban is found. - Warning auto-ban: When a player accumulates 3 active warnings, the system automatically issues a 7-day ban.
- Temporary ban expiration: Bans with an expiry date are handled automatically; expired bans no longer block players.
- Audit trail: Every kick, ban, unban, warning, and troll action is written to
jm_admin_logs.
Useful Queries#
Check all active bans:
SELECT * FROM v_active_bans;View a player's full history:
SELECT * FROM v_player_historyWHERE identifier = 'license:abc123'ORDER BY performed_at DESC;View recent admin activity:
SELECT * FROM jm_admin_logsORDER BY performed_at DESCLIMIT 50;Server statistics snapshot:
SELECT (SELECT COUNT(*) FROM jm_bans WHERE is_active = 1) AS active_bans, (SELECT COUNT(*) FROM jm_warnings WHERE is_active = 1) AS active_warnings, (SELECT COUNT(*) FROM jm_kicks) AS total_kicks;Maintenance#
Clean old audit logs (optional):
DELETE FROM jm_admin_logsWHERE performed_at < DATE_SUB(NOW(), INTERVAL 90 DAY);Backup your database regularly:
mysqldump -u username -p database_name > backup_$(date +%Y%m%d).sqlEnsure the MySQL event scheduler is enabled for automatic ban expiration:
SET GLOBAL event_scheduler = ON;Add to your MySQL config file (my.cnf / my.ini) for persistence:
[mysqld]event_scheduler=ONWarning
Never expose your database credentials. Use a dedicated MySQL user with only the permissions needed for this database, and back up regularly.