Earnings System
Revenue from paid events is split between the event creator and the server. Creators can track earnings and withdraw funds through their dashboard.
How It Works
- A player pays the entry fee to join a paid event
- The revenue is split according to configured percentages
- Creator's share is recorded in the earnings system
- Creator can withdraw earnings to their bank account
Earnings Dashboard
The creator dashboard includes a full earnings panel:
- Stats Cards: Total earnings, available balance, and growth percentage
- Revenue Chart: 7-day area chart showing daily revenue (powered by Recharts)
- Withdrawal Form: Enter amount and withdraw to bank
- Transaction History: Last 50 transactions with type, amount, and description
The dashboard auto-refreshes every 10 seconds to keep data current.
Withdrawal Rules
- Minimum withdrawal amount is configurable
- Cooldown period between withdrawals prevents abuse
- Balance is validated with a single optimized SQL query
- Funds are added directly to the player's bank account
Configuration
| Option | Default | Description |
|---|---|---|
Config.Features.EnableEarnings | true | Enable the earnings system |
Config.Earnings.CreatorPercentage | 80 | % of revenue going to the creator |
Config.Earnings.AdminPercentage | 20 | % of revenue going to the server |
Config.Earnings.MinWithdrawAmount | 100 | Minimum withdrawal amount |
Config.Earnings.WithdrawCooldown | 3600 | Seconds between withdrawals (1 hour) |
Config.Earnings.AutoPayout | false | Automatically pay out after event ends |
