Skip to main content

Nexal Jackpot

A deposit-based jackpot for Minecraft servers. Players put money into a shared pot and one winner takes it all, minus an optional rake. The more a player deposits, the higher their chance. A countdown starts once two players are in, a rolling animation reveals the winner, and every player's lifetime statistics are tracked. Server owners manage settings, rounds and data from an in-game admin GUI.

Features​

  1. Deposit-Based Odds - Every deposit adds to the pot; a player's chance is their share of it
  2. Jackpot GUI - /jp shows the round, your own deposit and chance, a live countdown, the biggest depositors, the last winners, Place Bet with the minimum and maximum, and one-click quick bets; updated live while open (see The jackpot GUI)
  3. Countdown Timer - Starts when the second player deposits (5 minutes by default); a round left open by a restart picks its countdown back up
  4. Dynamic Minimum Deposits - A flat minimum, or a percentage of the current pot that never drops below the flat amount
  5. Deposit Limits and Cooldowns - Optional per-player maximum per round and a cooldown between deposits
  6. Anti-Snipe Protection - A large deposit in the last seconds resets the timer
  7. Rolling Animation - Names roll in the subtitle or action bar and slow down until the winner is revealed
  8. Boss Bar Countdown - Pot, time left and player count for depositors, everyone, or nobody
  9. Rake - An optional percentage of the pot kept by the house
  10. Winner Rewards - Vault payout (can be turned off) plus console commands with %player%, %amount%, %pot% and %rake_amount%
  11. Deposit Alerts - Players see when others deposit and can turn it off with /jp alerts
  12. Player Statistics - Deposits made, jackpots entered and won, money spent and earned, net profit
  13. History Browser - Past rounds labelled "Last round", "2 rounds ago" and so on, with winner, pot, prize, rake, chance and the top depositors
  14. Admin GUI - /jp admin opens a hub with settings, the current round, force draw, cancel and refund, blocking players, history, export and import
  15. Round Controls - Force a draw, cancel a round (even mid-draw) and refund every deposit, or block players from the current round
  16. Money Formatting - Every amount (pot, bets, limits, winnings, rake) reads $1,000 or $1,000.50, set by price-format, number-format and hide-zero-decimals; money placeholders also come as a plain number for numeric conditions
  17. PlaceholderAPI - 17 placeholders, money as a plain number or formatted; the round-wide ones also work without a player
  18. Dual Storage - JSON (data.json) or MySQL/MariaDB, with export and import to move between them; open deposits are stored too, so a restart never loses escrowed money
  19. Safe Storage - Data is saved in the background; if it cannot be saved, deposits pause without taking money and resume once saving works again

Technologies​

  • Paper API 1.20.1+ - Minecraft server API (Spigot compatible)
  • Utilizer - Configuration, messages, GUIs, tasks
  • ACF - Command framework
  • nexal-core - JSON and SQL persistence (MariaDB/MySQL), help menus
  • Vault - Economy for deposits, refunds and payouts
  • PlaceholderAPI - Placeholder integration (optional)

Commands​

Alias: /jp

Player Commands​

CommandDescriptionPermission
/jackpot, /jpOpen the jackpot GUInexaljackpot.use
/jp \<amount>Deposit money into the jackpotnexaljackpot.use and nexaljackpot.deposit
/jp help [page]Show the help menunexaljackpot.use
/jp infoView the current roundnexaljackpot.use
/jp historyBrowse past roundsnexaljackpot.use
/jp statsView your statisticsnexaljackpot.stats
/jp alertsToggle deposit alertsnexaljackpot.alerts

Admin Commands​

All admin commands also work from the console.

CommandDescriptionPermission
/jp adminOpen the admin GUI (the console gets the admin commands)nexaljackpot.admin
/jp admin help [page]List the admin commandsnexaljackpot.admin
/jp admin forceDraw a winner now (needs two depositors)nexaljackpot.admin
/jp admin cancelCancel the round, including a draw being rolled, and refund every depositnexaljackpot.admin
/jp admin block \<player>Block a player from depositing in the current roundnexaljackpot.admin
/jp admin unblock \<player>Unblock a playernexaljackpot.admin
/jp admin exportExport players, open deposits and history to export/nexaljackpot.admin
/jp admin importImport the files in export/ into the current storagenexaljackpot.admin
/jp admin reloadReload the configuration (does not switch storage)nexaljackpot.admin

Admin GUI​

/jp admin opens a hub with:

  • Configuration: countdown, deposit cooldown, maximum deposit, minimum deposit mode, amount and share, rake and its percentage, winner payout, anti-snipe (on/off, share, window, reset), boss bar (on/off, viewers, color, style) and the rolling animation (on/off, length, display). Changes are saved to config.yml right away.
  • Current Round: status, pot, participants, time left and blocked players.
  • Force Draw and Cancel Round (shift click).
  • Block Players: every online player; click to block or unblock them for the current round.
  • Round History, Export Data and Import Data (shift click).

The jackpot GUI​

/jp opens a six-row screen, updated twice a second while open:

WhereWhat
Top rowYour Entry (your head: your deposit, win chance and what you would win), Current Round (status, prize pool, players, rake) and Time Left (live countdown with a progress bar)
Rows 2 and 3Players in this Round: the 14 biggest depositors as heads, with rank, deposit and win chance, biggest first
Row 5Last Winners: the last 5 rounds, each labelled "Last round", "2 rounds ago" and so on, with prize, win chance, pot, players and date
Bottom rowClose, up to four quick bets (quick-bets in config.yml), Place Bet (minimum, maximum, your balance; asks for the amount in chat) and History

Buttons shimmer and click. Glass accents in the theme colour frame the rows, rather than a full filler, and the rows show "No Bets Yet" or "No Winners Yet" when empty. Every text, material, the accent glass and the click sound are in the gui section of messages.yml.

Permissions​

PermissionDescriptionDefault
nexaljackpot.*All jackpot permissionsop
nexaljackpot.useUse /jp, the help menu, the GUI, info and historytrue
nexaljackpot.depositDeposit money, with /jp \<amount> or the GUI's Place Bettrue
nexaljackpot.statsView statisticstrue
nexaljackpot.alertsToggle deposit alertstrue
nexaljackpot.adminThe admin GUI and all admin commandsop

Placeholders​

Requires PlaceholderAPI.

PlaceholderDescription
%nexaljackpot_pot%Current pot total, as a plain number (1000.5)
%nexaljackpot_pot_formatted%Current pot total, formatted ($1,000.50)
%nexaljackpot_participants%Number of depositors
%nexaljackpot_state%Current state (waiting/active/drawing)
%nexaljackpot_timer%Seconds left in the countdown
%nexaljackpot_deposit%The player's deposit this round, as a plain number
%nexaljackpot_deposit_formatted%The player's deposit this round, formatted
%nexaljackpot_chance%The player's win chance (%)
%nexaljackpot_wins%Jackpots the player won
%nexaljackpot_participated%Jackpots the player entered
%nexaljackpot_deposits_made%Deposits the player made in total
%nexaljackpot_money_spent%Money the player deposited in total, as a plain number
%nexaljackpot_money_spent_formatted%Money the player deposited in total, formatted
%nexaljackpot_money_earned%Money the player won, as a plain number
%nexaljackpot_money_earned_formatted%Money the player won, formatted
%nexaljackpot_net_profit%Money earned minus money spent, as a plain number (-250)
%nexaljackpot_net_profit_formatted%Money earned minus money spent, formatted

The money placeholders (pot, deposit, money_spent, money_earned, net_profit) return a plain number for numeric conditions: no currency, no thousands separator, a dot for decimals, rounded to two decimals (1000, 1000.5). Add _formatted for the amount as price-format, number-format and hide-zero-decimals show it ($1,000, $1,000.50).

pot, pot_formatted, participants, state and timer work without a player; the others then show nothing.

Configuration​

config.yml​

# How amounts of money are shown everywhere: messages, GUIs, boss bar, history, _formatted placeholders
price-format: "$%amount%"
number-format: "#,##0.00" # Java DecimalFormat pattern
hide-zero-decimals: true # $1,000 rather than $1,000.00 (but $1,000.50)

# Countdown duration in seconds (starts when 2nd unique player deposits)
countdown-duration: 300

# Rake (house cut) taken from the pot before the winner is paid
rake:
enabled: true
percentage: 5.0 # percent of the pot (5.0 = 5%)

# Minimum deposit settings
min-deposit:
mode: percentage # "flat" or "percentage"
flat-amount: 10.0 # used when pot is 0 or mode is "flat"
percentage: 2.0 # percent of the current pot (2.0 = 2%)

# Maximum total deposit per user per round (0 = disabled)
max-deposit-per-user: 0

# Cooldown between deposits in seconds
deposit-cooldown: 10

# Quick-bet buttons next to Place Bet in /jp (up to 4; [] hides them)
quick-bets: [100, 500, 1000, 5000]

# Anti-snipe protection
anti-snipe:
enabled: true
percentage: 5.0 # a deposit of 5% of the pot or more triggers it
window-seconds: 60 # only when fewer than 60s are left
reset-seconds: 60 # resets the timer to 60s

# Boss bar display
bossbar:
enabled: true
color: PURPLE # PINK, BLUE, RED, GREEN, YELLOW, PURPLE or WHITE
style: SOLID # SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12 or SEGMENTED_20
display-mode: PARTICIPANTS # PARTICIPANTS, EVERYONE or NONE
# Placeholders: %pot% (with price-format), %time%, %players%
title: "<gradient:#9B59B6:#A569BD>\<bold>JACKPOT\</bold>\</gradient> \<gray>|\</gray> ..."

# Winner rolling animation
animation:
enabled: true
duration-ticks: 100 # 5 seconds
type: SUBTITLE # SUBTITLE or ACTIONBAR

# Disable Vault payout (if true, no money will be given to winners)
disable-vault-payout: false

# Storage type
storage:
type: json # json or sql
sql:
host: localhost
port: 3306
database: minecraft
username: root
password: ""

# Commands run when a player wins
# Placeholders: %player%, %amount%, %pot%, %rake_amount%
winner-commands: []

Before 1.0.3 the anti-snipe share was anti-snipe.threshold, a fraction (0.05 = 5%). The plugin converts it to anti-snipe.percentage on startup.

messages.yml​

All messages are fully customizable with MiniMessage colors and gradients, sounds and titles, including the texts of the jackpot and history GUIs (the gui section). The colors are listed at the top of the file for find-and-replace. Messages missing from an older messages.yml fall back to the defaults, and a $ it still writes before an amount ($%pot%) is dropped, since amounts carry their currency from price-format. Neither changes the file.

Database Schema​

With storage.type: json everything is kept in data.json, one collection per table below. With sql, the plugin creates these tables:

jackpot_users​

ColumnTypeKeyDescription
idVARCHAR(36)PKPlayer UUID
deposits_madeINTTotal deposit count
jackpots_wonINTTotal wins
jackpots_participatedINTTotal participations
money_spentDOUBLETotal money deposited
money_earnedDOUBLETotal winnings
purchase_alerts_enabledBOOLEANWhether the player sees deposit alerts

jackpot_entries​

The deposits of the open round, held in escrow until the draw or a refund.

ColumnTypeKeyDescription
player_idVARCHAR(36)PKPlayer UUID
deposit_amountDOUBLEThe player's total deposit this round

jackpot_history​

ColumnTypeKeyDescription
idVARCHAR(36)PKRecord UUID
winner_idVARCHAR(36)Winner UUID
winner_nameVARCHAR(16)Winner name
total_potDOUBLETotal pot amount
rake_amountDOUBLERake taken
winner_depositDOUBLEWinner's deposit
winner_chanceDOUBLEWinner's chance %
participant_countINTNumber of participants
participants_jsonTEXTJSON array of all participants
timestampBIGINTUnix timestamp (millis)

Key Legend: PK = Primary Key

If the storage cannot be loaded at startup (for example, the database is unreachable), the plugin disables itself. If saving fails while running, deposits pause and the plugin retries every 30 seconds; nothing is lost and deposits resume once saving works again.

Moving between JSON and SQL​

  1. /jp admin export
  2. Set storage.type in config.yml
  3. Restart the server (/jp admin reload does not switch storage)
  4. /jp admin import

Open deposits are exported and imported too, so this can be done mid-round. Import is refused while a winner is being drawn.

Dependencies​

  • Required for deposits: Vault and an economy plugin. Without them the plugin loads, but no deposit can be made and winners cannot be paid.
  • Optional: PlaceholderAPI
  • Server: Paper or Spigot 1.20+

Installation​

  1. Install Vault and an economy plugin
  2. Place the plugin JAR in your /plugins folder
  3. (Optional) Install PlaceholderAPI
  4. Start or restart the server
  5. Adjust the settings with /jp admin or in config.yml