Skip to content
Jan Kluka edited this page Nov 1, 2026 · 7 revisions

Bosses

Bosses is a premium addon. Mining by hand in your own private mine can wake a mine boss above it. You fight it by mining: every block you break by hand is a hit, and glowing weak spots hit twice as hard. Kill it before it escapes and it drops loot. Three times a day a server-wide Mega Boss attacks every mine at once. Everybody shares one health pool and the best fighters are rewarded by rank.

Owners set it all up in-game (/bosses admin editor), preview a boss or play a pretend Mega Boss fight before players see it, and show the best hunters on a Hall of Fame menu, on leaderboards placed in the world, and (with X-Prison Discord) on Discord.

Requires X-Prison 2026.3.15.1+ (1.1.0+) and X-PrivateMines 2026.4.0.4+ (bosses live above a player's private mine). Paper or Spigot 1.20.5+, Java 17+. PlaceholderAPI is optional. On a peaceful mine world, bosses need Paper 1.21.4+. Older versions and Spigot remove hostile mobs on peaceful, so only the boss's name would show. With WorldGuard's block-plugin-spawning: true, the mine regions must not deny mob-spawning. If they do, the console says so. Drop X-Prison-Bosses-1.0.0.jar into plugins/X-Prison/addons/ and restart.


Mine bosses

  • Every block a player breaks by hand inside their own private mine rolls the spawn chance (spawn.one-in, default 1 in 18,000). The Boss Hunter enchant improves the chance.
  • Blocks broken by enchants (Explosive, Nuke, Laser and the rest) never wake or hurt a boss.
  • The boss appears standing on top of the mine, with a hologram (name, health, time left) and a boss bar. Only the owner sees it, its weak spots and its bar, and only the owner's hand breaks count.
  • One block broken by hand is 1 hit. A block marked as a weak spot (a glowing outline with sparkles) is 2 hits. When it is broken, a sound plays and a new weak spot appears somewhere else in the mine. Weak spots are picked in the layer the owner is mining (weak-spots.search-depth).
  • Chat milestones go out at 75%, 50% and 25% health.
  • Kill it and it rolls its loot: drops rolls, plus extra-drop-chance for one more. Each roll picks one entry from the rarity's weighted loot list and runs that entry's commands.
  • After escape-after-seconds (10 minutes, or the rarity's own escape-after-seconds) it escapes and drops nothing. The timer keeps running while the owner is away or offline. If they come back in time, the boss is still there.
  • A server restart does not lose it: health and time left are saved and restored.
Rarity Share Health Drops (+10% chance of +1)
Common 62% 1,300 1
Rare 25% 2,600 2
Epic 9% 4,550 3
Legendary 4% 7,800 4

Boss Hunter (enchant id 104)

A passive pickaxe enchant shipped with the addon (boss-hunter.json, like any other X-Prison enchant). Each level adds spawnChanceBonusPerLevel (0.02%), so level 1,000 gives +20%: 1 in 18,000 becomes 1 in 15,000. It costs Tokens (5000 * 1.004^level) and sits on page 2 of the enchant menu.


Mega Boss

  • At each time in schedule.times (default 15:00, 19:00, 23:00 in X-Prison's global time zone), a giant boss appears above the mine of every online player who owns one. A scheduled fight is skipped when fewer than schedule.minimum-fighters mine owners are online.
  • Start, reminder, milestone and result messages go to everyone online, or only to mine owners with broadcast-to-everyone: false.
  • All of those copies share one health pool: health-formula is worked out when the fight starts (default 25000 + 4000 * fighters). Every block anyone breaks by hand in their own mine is a hit on it, and weak spots count double here too. A player who comes online mid-fight joins in.
  • Mine bosses stop spawning pause-spawns-before-seconds (5 minutes) before a fight. A mine boss that is already up when the fight starts hides with its timer paused, and comes back with the time it had left once the fight is over.
  • Reminders are broadcast 10, 5 and 1 minute before a fight.
  • Chat milestones go out at 75%, 50%, 25% and 10% health. The Mega Boss has its own milestones in bosses-mega.yml, separate from the mine boss ones in bosses.yml.
  • During a fight a damage leaderboard is posted to chat every leaderboard.interval-seconds (60). It shows the top leaderboard.size (10) players by damage. Every player who has dealt damage also gets a line with their own damage and live rank. Set the interval to 0 to turn it off.
  • A player is told once per fight when they reach minimum-hits and so qualify for rewards.
  • Killed: fighters are ranked by hits. Anyone below minimum-hits (50) is not ranked. Each ranked player gets the first tier their rank falls into (#1, #2–3, #4–10, #11–50, 51+), and whoever lands the killing hit also gets the final blow reward.
  • Escaped: if it is still alive after duration-seconds (10 minutes), nobody is rewarded.
  • Rewards are written to the database before any command runs. A reward the server could not hand out before stopping is handed out on the next start. A fight that was on during a restart resumes; one that ran out of time while the server was down counts as escaped.

Admin tools

In-game editor

/bosses admin editor opens a menu for everything that decides how bosses play:

  • Rarities & Loot: create, clone and delete rarities. Set the names, colour, spawn weight (the share is shown), health, drops, extra-drop chance, escape time, boss bar, entity type and size. Gear and icons are taken from the item you hold. Each rarity's loot table: entries, weights (the chance is shown), display lines, icons and commands. A new rarity starts with weight 0, so it does not spawn until you give it a share. The last rarity cannot be deleted.
  • Mega Boss: on/off, fight times, length, start grace, mine boss pause, reminders, minimum fighters, who hears the messages, health formula (with the result for 1, 10 and 50 fighters), milestones, chat leaderboard, minimum hits, reward tiers (add, move up, delete, ranks, display, commands) and the final blow.
  • General: master switch, spawn chance, escape time, damage per block, weak spots, mine boss milestones.

Text and numbers are typed in chat (cancel to back out). Every change is checked first, written to the file at once (comments are kept) and applied without a restart. A copy of each file is kept in Bosses/backups/ before the first change in any ten minutes; the last ten copies per file are kept. Menu slot clashes that a change causes are named in chat.

Preview, simulate, loot test

  • /bosses admin preview <rarity|mega> [seconds] shows the boss with its hologram and boss bar four blocks in front of you, for 30 seconds by default. Only you see it. preview stop removes it. The rarity editor has a Preview button too.
  • /bosses admin mega simulate [fighters] plays a whole Mega Boss fight in your chat: start, the "qualified" notice, milestones, the leaderboard, the kill, your result and your rewards, plus the commands that would run. Nothing is paid, saved, announced or fired as an event.
  • /bosses admin loot <rarity> [kills] rolls a rarity's loot (1,000 kills by default) and shows how often each entry dropped next to its expected chance.

Hall of Fame and leaderboards

  • /bosses top (or the Hall of Fame button in /bosses) shows the all-time top players as heads on a podium, with tabs for Mega Boss kills, #1 finishes, final blows, mine boss kills and total damage.
  • /bosses admin leaderboard create <id> <category> [size] places a leaderboard where you stand, visible to everyone. move <id>, remove <id> and list manage them. Categories: damage, mega-kills, mega-firsts, final-blows, boss-kills, boss-kills:<rarity>, next-mega (a countdown, or the fight in progress) and last-mega (the outcome and its best players). They are saved in bosses-leaderboards.yml and come back after a restart.
  • The boards are read from the database every hall-of-fame-refresh-seconds (60) in bosses.yml, so a new kill shows up within a minute or so.

Menus

/bosses opens Mine Bosses:

  • How bosses work: your chance, Boss Hunter level and your current boss. Click it to go to your mine.
  • One button per rarity: its share, health, drops and your kills. Click one to see its loot.
  • Your all-time stats.
  • The Mega Boss button, with the next fight time. Click it for the Mega Boss menu: schedule, rewards by rank, the last fight's leaderboard and your own result.
  • The Hall of Fame button.

Open menus refresh every second.


Files

Written to plugins/X-Prison/addons/Bosses/ on first start, and only when missing, so your edits are never overwritten. A setting added by an update falls back to the bundled default and is named once in the console.

File What it holds
bosses.yml Master switch, command and its permission, spawn chance, escape time, damage, weak spots (count, multiplier, colour, particle, sound, search depth), milestones, hologram and boss bar switches, death effect, hit effects, Hall of Fame refresh
bosses-rarities.yml Rarities: weight, health, drops, optional own escape time and titles/sounds, look (entity, scale, gear), boss bar, menu item, loot (an icon may be a full item: material, head-texture, custom_model_data, glow). Taken exactly as written, never merged
bosses-mega.yml Schedule, minimum fighters, who hears the messages, duration, milestones, leaderboard, health formula, look, boss bar, reward tiers, final blow
bosses-messages.yml Every message, title and sound, plus the hologram and boss bar layouts
bosses-gui.yml The four menus (main, loot, Mega Boss, Hall of Fame), including the time formats. Slots that collide or fall outside a menu are named in the console at start and on reload
bosses-leaderboards.yml Leaderboards placed in the world. Written by /bosses admin leaderboard
backups/ Copies the in-game editor makes before it changes a file
boss-hunter.json The Boss Hunter enchant

The shipped loot and Mega rewards are examples: they run crate key give %player% mythical|omega <amount>. Point them at your own crates, items or currencies before going live.

All text is MiniMessage. In loot and reward commands, %player% is the player's name, and %rank% is their finishing rank (Mega Boss rewards only).


Commands & permissions

Command Permission
/bosses (aliases /boss, /mineboss) command.permission (empty = everyone) Open the menu
/bosses <player> xprison.menu.other Open the menu for another player
/bosses mega — Mega Boss menu
/bosses loot <rarity> — A rarity's loot
/bosses top [category] — Hall of Fame
/bosses admin editor xprison.bosses.admin The in-game editor
/bosses admin spawn <player> [rarity] xprison.bosses.admin Wake a boss above their mine (random rarity if omitted). Refused while a Mega Boss fight is on
/bosses admin remove <player> xprison.bosses.admin Remove their boss, no loot
/bosses admin mega start|stop xprison.bosses.admin Start a fight now, or call one off (no rewards)
/bosses admin mega simulate [fighters] xprison.bosses.admin A pretend fight only you see (20 fighters by default, up to 200)
/bosses admin preview <rarity|mega|stop> [seconds] xprison.bosses.admin Show a boss in front of you (5-300 seconds)
/bosses admin loot <rarity> [kills] xprison.bosses.admin Roll its loot table (up to 100,000 kills)
/bosses admin leaderboard create|move|remove|list xprison.bosses.admin Leaderboards in the world
/bosses admin info xprison.bosses.admin What is running
/bosses admin reload xprison.bosses.admin Reload every Bosses file (also /xprison reload Bosses). If a file is not valid YAML, the console names it and nothing is reloaded; at start, Bosses stays off until it is fixed

spawn.permission in bosses.yml can restrict who can wake bosses at all.


Placeholders

Prefix %xprisonbosses_…%. Values refresh once a second.

Placeholder
boss_active, boss_name, boss_rarity, boss_health, boss_max_health, boss_time_left Your current mine boss
chance, hunter_level Your "1 in N" chance and Boss Hunter level
kills, kills_<rarity>, total_hits All-time stats
mega_kills, mega_firsts, final_blows, best_finish All-time Mega Boss stats
mega_hits, mega_rank You in the current fight
mega_active, mega_health, mega_max_health, mega_time_left, mega_fighters, mega_next, mega_next_in The Mega Boss
top_<category>_<n>_name, top_<category>_<n>_value Place n (1-25) of a Hall of Fame board, e.g. top_mega-kills_1_name. Categories as for the leaderboards. Refreshed with the Hall of Fame

Developer events

Package dev.drawethree.xprison.bosses.api.event:

Event
BossSpawnEvent Cancellable. Owner, rarity, natural or admin
BossKillEvent Killer, rarity, the loot entry ids
BossEscapeEvent Owner, rarity, health left
MegaBossStartEvent Fight id, health, fighters
MegaBossEndEvent Fight id, killed or not, stopped by an admin or not, final blow, standings

Notes

  • Performance: a hand break costs a map lookup, a bounds check and one random roll. There is no database access and no event on the hot path. Everything else runs on one task a second, and the database is written on its own thread.
  • Packet mines are supported: weak spots read the virtual blocks.
  • Boss entities are never saved into the world. They are invulnerable, have no AI, and are cleaned up on start and stop. The hologram follows the boss's scale, so a bigger boss keeps its name above its head.

Translations

Since 1.1.0 the addon follows each player's /xprison language (X-Prison 2026.3.15.1+). German, Spanish, French and Brazilian Portuguese are included for bosses.yml, bosses-gui.yml, bosses-messages.yml, bosses-mega.yml, bosses-rarities.yml and boss-hunter.json (as boss-hunter.yml). Your own boss - its hologram, boss bar and messages - and the Mega Boss copy above your mine are in your language. Leaderboards placed in the world, %..._boss_name% placeholders, the Mega Boss reward lines and the admin editor stay in the server language. Your edited lines always win. To change a translation, write the line in plugins/X-Prison/lang/addons/Bosses/<language>/<same file name> - see Translations.

XPrison Logo

General

Modules

Default Configs

Enchant Configs — Passive

Enchant Configs — Currency Rewards

Enchant Configs — Key & Item Rewards

Enchant Configs — Area of Effect

Enchant Configs — Multipliers

Enchant Configs — Templates

Enchant Configs — Addons

Addons

Support

For Developers

Others

Clone this wiki locally