DriftBounties
Money on a head, paid exactly once.
Bounties for Paper and Folia 26.3. Put money on a player's head (online or offline), stack bounties from several players, see the biggest ones in a menu, and get paid for the kill, minus tax. A player who logs out in combat loses their bounty to whoever hit them last. Part of DriftSuite.
Features
- Place bounties:
/bounty <player> <amount>puts money on a player's head. The player can be offline, as long as they've played here before. Min and max amounts are in config.yml, and big bounties ask for a yes/no pop-up first. - Stacking: bounties from several players on the same target add up into one total.
/bounty checkshows who put in how much. - Top bounties menu:
/bountyshows everyone with a bounty as heads, biggest first, with the amount and how many players placed it. Click a head to add to that bounty (type the amount in chat), right-click to see who placed it. Your own bounty is shown at the top. - Payout on kill: whoever kills a player with a bounty gets it, minus
tax-percent(10% by default). A killer who logs off before being paid gets it on their next join. - Combat logging (DriftCombat): when a player with a bounty leaves while in combat, the player who hit them last gets the bounty.
- Anonymous bounties:
/bounty <player> <amount> anonymoushides your name from the target, announcements and/bounty check, for an extra fee (anonymous-fee-percent). The fee isn't added to the bounty. - Expiry: bounties run out after
expire-after(7 days by default) and the money goes back to whoever placed them, straight away if they're online or on their next join. - Announcements: placing and claiming a bounty is announced to everyone (with a minimum amount if you like).
- Head drop: a bounty claimed with a kill drops the victim's head, with the bounty's value and the killer in the lore. It's only a trophy.
- Anti-abuse: no bounty on yourself, no payout for killing yourself, a teammate or ally (DriftTeams), a player on the same IP address, or the same victim again within a cooldown, and nothing for killers in creative or spectator. Money you put on someone stays on them if you kill them yourself: you can't claim your own bounty.
- Staff tools: take a bounty off a player (refunding the placers, or not), and see money waiting for a player.
Requirements
- Paper or Folia 26.3 (Leaf works), Java 25.
- An economy: Vault with any economy plugin (DriftEconomy with
features.vault: trueworks), a DriftEconomy currency, or XP levels. Seteconomyin config.yml. - Optional: DriftCombat (combat-log payouts), DriftTeams (the teammate and ally check), PlaceholderAPI.
- Storage is H2 (a file in the plugin folder) unless you set MySQL or MariaDB. Use MySQL or MariaDB to share bounties between servers.
DriftTeams and DriftCombat are looked up while the server runs, so DriftBounties works without them and uses them as soon as they're installed.
Installation
- Put
DriftBounties-<version>.jarinplugins/and start the server. It works without any changes and keeps its database inplugins/DriftBounties/data/(see Folder layout). - It needs money to pay bounties in: Vault with an economy plugin (with DriftEconomy, set
features.vault: truein its config), a DriftEconomy currency, or XP levels. Seteconomyinconfig.yml. - For a network, set
storage.type: MYSQLon every server to share bounties.
Commands
| Command | What it does | Permission |
|---|---|---|
/bounty (alias /bounties) | The top bounties menu | none |
/bounty top | The same menu | none |
/bounty <player> <amount> | Put money on a player's head | driftbounties.place |
/bounty <player> <amount> anonymous | The same, without your name (costs extra) | driftbounties.anonymous |
/bounty check [player] | A player's bounty and who placed it | none |
/bounty help | The list of commands | none |
/driftbounties remove <player> [norefund] | Take every bounty off a player; placers are refunded unless norefund | driftbounties.admin |
/driftbounties owed <player> | Money waiting for a player's next join | driftbounties.admin |
/driftbounties reload | Reload every file | driftbounties.admin |
/driftbounties version | Show the version | driftbounties.admin |
/driftbounties help | The list of staff commands (click a line to fill it in) | driftbounties.admin |
Names, aliases and permissions can be changed in commands.yml. No other DriftSuite plugin uses these names.
Permissions
| Permission | Default | What it does |
|---|---|---|
driftbounties.place | everyone | Place bounties |
driftbounties.anonymous | everyone | Place anonymous bounties |
driftbounties.exempt | nobody | Nobody can put a bounty on this player (checked while they're online) |
driftbounties.admin | op | The /driftbounties staff commands |
Turning features on and off
At the top of config.yml. They apply on /driftbounties reload, except placeholders, which needs a restart.
| Switch | What it turns on |
|---|---|
broadcasts | Announcing bounties to everyone when they're placed or claimed |
anonymous | Anonymous bounties |
expiry | Bounties running out and being refunded. While it's off, nothing runs out |
head-drop | The victim's head dropping when a bounty is claimed |
placeholders | PlaceholderAPI placeholders |
combat-log-payout | Paying the last attacker when a player logs out in combat (needs DriftCombat) |
block-creative-killers | No payout for killers in creative or spectator |
block-teammates | No payout for killing a teammate (needs DriftTeams) |
block-allies | No payout for killing an ally (needs DriftTeams) |
block-same-ip | No payout when killer and victim share an IP address |
Placing bounties, the menu, /bounty check and payouts are always on.
Settings
config.yml:
| Setting | Default | What it does |
|---|---|---|
economy | vault | vault, xp or the name of a DriftEconomy currency |
tax-percent | 10 | How much of a claimed bounty is taken away, in percent |
repeat-kill-cooldown | 3600 | Seconds before the same killer can claim a bounty on the same victim again (0 = off) |
combat-log-reasons | [QUIT] | Which DriftCombat punishments count as logging out in combat: QUIT and/or KICK |
head-drop | min-amount, name and lore of the dropped head | |
min-amount | 100 | The smallest bounty one player can place at once |
max-amount | 1000000 | The biggest bounty one player can place at once (0 = no limit) |
anonymous-fee-percent | 10 | The extra cost of an anonymous bounty |
expire-after | 7d | How long a bounty lasts, like 12h or 1w2d |
confirm-above | 10000 | Ask with a pop-up before placing a bounty that costs this much (0 = never) |
broadcast-min | 0 | Only announce bounties of at least this much |
check-lines | 10 | How many placers /bounty check lists |
refresh-seconds | 30 | How often totals are re-read from the database (for servers sharing MySQL) |
storage | H2 | type (H2, MYSQL, MARIADB), connection details and table-prefix |
Can't be exploited
- Money first: placing a bounty takes the money before the bounty is saved. If saving fails, the money goes back.
- Paid once: a payout deletes the victim's bounty rows in one database transaction, and only the rows that transaction really deleted are paid. Two kills at once, a kill and a combat log, or two servers can't pay the same bounty twice. The death DriftCombat may cause while a combat-logger leaves doesn't pay again.
- Refunds by UUID: expiry and staff removal delete each row and save the refund for its placer (by UUID) in the same transaction, so a bounty can't be both refunded and claimed.
- Nothing lost offline: money for a player who isn't online waits in the database and is paid when they join. The row is deleted before the money is given, and goes back if the economy refuses.
- One action at a time: a player can only place one bounty at a time, and the pop-up's button works once, so double-clicking can't charge twice.
- No farming: see Anti-abuse in Features. The repeat-kill cooldown is checked and saved inside the payout transaction.
- Locked menu: nothing can be taken out of the top bounties menu.
PlaceholderAPI
| Placeholder | Shows |
|---|---|
%driftbounties_amount% | The player's bounty, formatted by the economy |
%driftbounties_amount_raw% | The same as a plain number |
%driftbounties_placers% | How many players put money on them |
%driftbounties_count% | How many players have a bounty |
%driftbounties_top_<n>_name% | The player with the nth biggest bounty |
%driftbounties_top_<n>_amount%, _top_<n>_amount_raw% | Their bounty |
Configuration files
| File | What's in it |
|---|---|
config.yml | Feature switches, the money, bounty rules, anti-abuse, the head drop and storage |
commands.yml | Command names, aliases and permissions |
messages.yml | Every message, in MiniMessage |
menus.yml | The top bounties menu |
Bounties live in the database, not in a file.
Every file starts with a boxed header saying how to apply changes, is split into sections, and has a note above
every option saying what it does, its unit and the values it takes. The prefix is DRIFTBOUNTIES in bold solid
maroon (#9f1239), followed by a dark grey ».
When you update, new options are added with their notes and everything you changed is kept. When the notes
themselves change, each file is rebuilt once with the new notes and your values written back in; the old file is
kept in data/backups/. Messages you never changed get the new default wording.
Mistakes in the files
A value DriftBounties can't use never stops the plugin. The console says which file and option, what was wrong and what is used instead, for example:
[DriftBounties] config.yml: tax-percent 150 is above 100, using 100
/driftbounties reload tells you how many problems it found, so you know to look.
Folder layout
plugins/DriftBounties/
config.yml settings, starting with the features: switches
messages.yml every message
menus.yml every menu
commands.yml command names, aliases and permissions
data/ the plugin's own files, no need to open them
database.mv.db bounties and money waiting for players (H2 storage)
backups/ old copies of files DriftBounties replaced
*.version which version of each file you have
Older versions kept data.mv.db and the .version markers next to config.yml. They are moved into data/ the
first time the new version starts (one console line per file), and nothing is overwritten or deleted.