History Module
History Module
Section titled βHistory ModuleβThe History Module displays player punishment history with pagination and detailed information for each entry.
π Features
Section titled βπ FeaturesβCore Functionality
Section titled βCore Functionalityβ- Complete History - View all punishment history for a player
- Pagination - Navigate through multiple pages of history
- Detailed Information - Case IDs, reasons, staff, dates
- Interactive Navigation - Click to navigate pages
Advanced Features
Section titled βAdvanced Featuresβ- Hover Information - Detailed entry info on hover
- Type-Specific Colors - Color-coded by punishment type
- Status Display - Active/Expired/Permanent indicators
- Duration Formatting - Human-readable duration display
- IP Tracking - Shows IP addresses for each entry
π Commands
Section titled βπ Commandsβ/history <player> [page]
Section titled β/history <player> [page]βView playerβs punishment history.
Permission: zenith.history
Parameters:
player- Player name or UUIDpage- Page number (optional, defaults to 1)
Examples:
/history Player123 # View first page/history Player123 2 # View second page/history Player123 3 # View third pageβοΈ Configuration
Section titled ββοΈ ConfigurationβModule Settings
Section titled βModule Settingsβenabled: true
history: entries_per_page: 8
messages: header: "{prefix}&#FFAA00History for &#FFFF00{player} &#FFAA00(Page {current_page}/{total_pages})" footer: "{prefix}F7F7FUse &#FFFF00/history {player} <page> F7F7Fto view other pages"
no_history: "{prefix}&#FFAA00No history found for &#FFFF00{player}" invalid_page: "{prefix}&#FF0000Invalid page number! Available pages: 1-{max_pages}" player_not_found: "{prefix}&#FF0000Player &#FFFF00{player} &#FF0000not found!"Entry Format
Section titled βEntry Formatβentry_format: message: "&#FFAA00[{case_id}] &#FFFFFF{type} F7F7F- {reason}"
hover: enabled: true text: - "&#FFAA00Case #{case_id}" - "&#FFFFFFType: &#FFFF00{type}" - "&#FFFFFFReason: &#FFFF00{reason}" - "&#FFFFFFStaff: &#FFFF00{staff}" - "&#FFFFFFDate: &#FFFF00{date}" - "&#FFFFFFDuration: &#FFFF00{duration}" - "&#FFFFFFStatus: &#FFFF00{active}" - "&#FFFFFFIP: &#FFFF00{ip}"Type-Specific Formatting
Section titled βType-Specific Formattingβtypes: BAN: color: "&#FF0000" display_name: "BAN" IP_BAN: color: "&#FF0000" display_name: "IP BAN" MUTE: color: "&#FFAA00" display_name: "MUTE" WARN: color: "&#FFFF00" display_name: "WARN" KICK: color: "&#FF8800" display_name: "KICK" UNBAN: color: "�FF00" display_name: "UNBAN" UNMUTE: color: "�FF00" display_name: "UNMUTE"π Available Variables
Section titled βπ Available VariablesβMessage Variables
Section titled βMessage Variablesβ| Variable | Description | Example |
|---|---|---|
{player} | Player name | Player123 |
{current_page} | Current page number | 1 |
{total_pages} | Total pages | 3 |
{max_pages} | Maximum pages | 5 |
Entry Variables
Section titled βEntry Variablesβ| Variable | Description | Example |
|---|---|---|
{case_id} | Unique case ID | BAN-123 |
{type} | Punishment type | BAN, MUTE, WARN |
{reason} | Punishment reason | Cheating detected |
{staff} | Staff member | Admin123 |
{date} | Timestamp | 2025-01-14 15:30 |
{duration} | Duration | 7 days |
{active} | Active status | Active, Expired |
{ip} | IP address | 192.168.1.1 |
Status Variables
Section titled βStatus Variablesβ| Variable | Description | Example |
|---|---|---|
{active} | Current status | Active, Expired, Permanent |
π¨ Display Examples
Section titled βπ¨ Display ExamplesβHistory Display (Page 1)
Section titled βHistory Display (Page 1)ββββββββββββββββββββββββββββββββββββββββββββββ History for Player123 (Page 1/3) ββ ββ [BAN-123] BAN - Cheating detected ββ ββ [MUTE-124] MUTE - Spam ββ ββ [WARN-125] WARN - Griefing ββ ββ [KICK-126] KICK - Inappropriate behavior ββ ββ [BAN-127] BAN - Repeated violations ββ ββ [MUTE-128] MUTE - Harassment ββ ββ [WARN-129] WARN - Rule violation ββ ββ [BAN-130] BAN - Toxic behavior ββ ββ β Previous | Next β ββ ββ Use /history Player123 <page> βββββββββββββββββββββββββββββββββββββββββββββHover Information
Section titled βHover InformationβWhen hovering over an entry:
ββββββββββββββββββββββββββββββββ Case #BAN-123 ββ Type: BAN ββ Reason: Cheating detected ββ Staff: Admin123 ββ Date: 2025-01-14 15:30:00 ββ Duration: 7 days ββ Status: Active ββ IP: 192.168.1.1 ββββββββββββββββββββββββββββββββπ Navigation
Section titled βπ NavigationβPage Navigation
Section titled βPage NavigationβPlayers can navigate through history pages:
/history Player123 1Displays entries 1-8 (first page)
/history Player123 2Displays entries 9-16 (second page)
Click on β[β Previous]β or β[Next β]β in chat to navigate.
Navigation Messages
Section titled βNavigation Messagesβnavigation: previous_page: "&#FFAA00[β Previous]" next_page: "&#FFAA00[Next β]" page_separator: "F7F7F | " no_previous: "򇨣[β Previous]" no_next: "򇨣[Next β]"π Date Formatting
Section titled βπ Date FormattingβDate Configuration
Section titled βDate Configurationβdate: format: "dd.MM.yyyy HH:mm:ss" timezone: "Europe/Berlin"Duration Formatting
Section titled βDuration Formattingβduration: permanent: "&#FF0000Permanent" expired: "F7F7FExpired" active: "�FF00Active" format: "&#FFFF00{duration}"Examples:
- Active:
7 days(green) - Expired:
Expired(gray) - Permanent:
Permanent(red)
π Permissions
Section titled βπ PermissionsβRequired Permissions
Section titled βRequired Permissionsβ| Permission | Description |
|---|---|
zenith.history | View player history |
π οΈ Troubleshooting
Section titled βπ οΈ TroubleshootingβCommon Issues
Section titled βCommon IssuesβIssue: βNo history foundβ when history exists
- Check database connection
- Verify player has history entries
- Check if history module is enabled
Issue: Wrong entries displayed
- Check pagination logic
- Verify entries per page setting
- Review database queries
Issue: Hover information not showing
- Check if hover is enabled
- Verify hover text configuration
- Check for syntax errors
Issue: Invalid page error
- Verify page number is within range
- Check total pages calculation
- Review database query results
Debug Mode
Section titled βDebug ModeβEnable debug mode for detailed logging:
debug: enabled: true console: true file: trueπ Performance
Section titled βπ PerformanceβOptimization Tips
Section titled βOptimization Tipsβ- Paginated Results - Limits displayed entries (8 per page default)
- Efficient Queries - Indexed player UUID lookups
- Lazy Loading - Only loads current page
- Caching - Caches page results temporarily
Configuration for Large History
Section titled βConfiguration for Large HistoryβFor players with extensive history:
history: entries_per_page: 5 # Reduce entries per pageFor quick overview:
history: entries_per_page: 10 # Show more entriesπ Database Schema
Section titled βπ Database SchemaβHistory Table
Section titled βHistory TableβCREATE TABLE zn_history ( id INT PRIMARY KEY AUTO_INCREMENT, case_id VARCHAR(50) UNIQUE NOT NULL, player_uuid VARCHAR(36) NOT NULL, player_name VARCHAR(16) NOT NULL, staff_uuid VARCHAR(36) NOT NULL, staff_name VARCHAR(16) NOT NULL, punishment_type VARCHAR(20) NOT NULL, reason TEXT NOT NULL, duration BIGINT, expiry_time BIGINT, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, additional_data TEXT, ip_address VARCHAR(45));Query Example
Section titled βQuery Exampleβ-- Get paginated history for a playerSELECT * FROM zn_historyWHERE player_uuid = ?ORDER BY created_at DESCLIMIT ? OFFSET ?;Need help with the History Module? Join our Discord: https://discord.gg/2qCMn6KHj4