Skip to content

Catch Combo Bank

Lets players save the catch combo they are on in a personal bank and take it back out later. Depositing costs money (Vault, so XConomy on this network). Withdrawing is free.

What it does

  • A player can bank their live catch combo, start a new one, and swap back later.
  • Each player has a number of bank slots. Donor ranks give more slots. Staff can grant extra slots.
  • Every action that costs money or throws away a combo asks for confirmation first.
  • Runs server-side on the Youer backends. Clients install nothing.

How players use it

Run /combobank (aliases /ccbank, /catchcombobank) to open the bank menu.

Row 0   . . . . I . . . .      I = summary, prices, slot breakdown
Row 1   S S S S . . . . .      S = an owned bank slot, in deposit order
Row 2   . . . . . . . . .
Row 3   . . C . D . . . X      C = your live combo, D = deposit, X = close
  • Deposit (D): your live combo moves into a free slot. Costs $2,000 by default. You need a combo of at least 2, and a free slot.
  • Withdraw (click a slot): that combo becomes your live combo again and the slot frees up. Free. Your current live combo is lost unless you swap.
  • Swap: if your live combo is longer than 1, withdrawing also offers a swap. For $2,000 your live combo goes into the slot you are emptying. Works even when the bank is full.
  • An entry for a Pokemon that no longer exists in Pixelmon shows as unusable. You can discard it to free the slot. Nothing is refunded.

The menu grows with the number of slots you own (two rows minimum, three past 18). Locked slots are never shown.

Staff guide

<target> is a name or a UUID, so every staff command works on offline players. If a name is not in the profile cache, the command refuses it. Use the UUID instead.

Task Command
See what a player has banked /combobank inspect <target>
Open a player's bank and remove an entry (asks to confirm, permanent) /combobank admin <target>
See where a player's slot count comes from (base, rank, grant, cap) /combobank slots <target>
Set a player's extra slots to an exact number /combobank slots <target> set <n> [note]
Add or remove extra slots (negative removes) /combobank slots <target> add <n> [note]
Show the rank ladder as loaded /combobank ladder
Reload the rank ladder after editing it /combobank reload

Examples:

/combobank slots SnowBirdMV add 2 vault ticket compensation
/ccbank admin 3f2a...uuid
  • Always add a note. The note and the granter are saved, so /combobank slots can show who gave the slots and why months later. Every change is also logged at INFO.
  • Slot grants work even when the bank is disabled or the economy is down, so a bad grant can be fixed.
  • Removing slots never deletes banked combos. A player over their limit keeps everything and can still withdraw. They just cannot deposit until they are under the limit.
  • On production, each alias (combobank, ccbank, catchcombobank) needs its own CommandWhitelist entry. Ops bypass CommandWhitelist, so test as a non-op.

How many slots a player gets

slots = min(cap, max(base, highest rank held) + individual grant)
  • base: baseSlots in the ladder file. Everyone gets it. Default 1.
  • rank: the highest ladder rung whose permission the player holds. A rank is a total, not an addition. A rank 3 player also holds ranks 1 and 2, so rungs never add up.
  • individual grant: extra slots for one player, set by staff. It adds on top and survives a rank change. Use it for purchases, prizes, and compensation.
  • cap: absoluteMaxSlots, never above 27 (the menu size).

Never express a rank as a grant, or a purchase as a rank node. A grant on top of a rank double-pays after an upgrade. A purchase stored as a rank is lost when the rank changes.

The default ladder is keyed on group.rank1, group.rank2, group.rank3 (LuckPerms inheritance nodes), so it works with the donor ranks with no LuckPerms changes. Themed ranks (for example rank3dragon) inherit rank3, so they work too. rank4 and rank5 get rank 3's slots until they get their own rung. If a rank group is renamed, those players drop to base until the ladder is fixed; /combobank ladder will show it.

There is deliberately no catchcombobank.slots.<n> node. With apply-wildcards: true, a stray catchcombobank.slots.* grant would break the number parsing.

Configuration

Two files, split by how often they change.

config/catchcombobank-server.toml: prices and thresholds. Restart to apply. Read at boot only. See the Reference section for every key and default.

config/catchcombobank-ranks.json: the slot ladder. Apply with /combobank reload. Written with these defaults on first boot:

{
  "baseSlots": 1,
  "absoluteMaxSlots": 9,
  "ranks": [
    { "id": "rank1", "permission": "group.rank1", "slots": 2 },
    { "id": "rank2", "permission": "group.rank2", "slots": 3 },
    { "id": "rank3", "permission": "group.rank3", "slots": 4 }
  ]
}
  • absoluteMaxSlots max 27. baseSlots may not exceed it. Rank ids and permissions must be unique.
  • A rung above the cap is allowed and clamped, so you can raise a rung before raising the cap.
  • A rung's permission can be any node, not just group.*.
  • A reload that fails to parse keeps the old ladder and says so. Before any good load, the fallback is base 1, cap 9, no ranks.

Data and storage

  • One file per player: <world>/data/catchcombobank/<uuid>.properties. Written atomically.
  • No database (MariaDB is near its connection limit).
  • The extraSlots* keys hold the staff grant. A file without them means a grant of 0.
  • A file that cannot be read is treated as an error, not an empty bank, so it cannot be overwritten.
version=1
entries=1
entry.0.speciesDex=25
entry.0.speciesName=Pikachu
entry.0.count=41
entry.0.storedAt=1757000000000
extraSlots=2
extraSlotsGrantedBy=SnowBirdMV
extraSlotsGrantedAt=1757000000000
extraSlotsNote=vault ticket compensation

Troubleshooting

Symptom Cause Fix
A non-op gets "Unknown command" Missing CommandWhitelist entry for that alias Add combobank, ccbank, catchcombobank to CommandWhitelist
A donor has base slots only Their rank group was renamed, or the node is server-scoped /combobank slots <target> and /combobank ladder; fix the ladder file, then /combobank reload
Withdrawn combo is gone after relog Catch Combo Persistence is not installed Deploy catchcombopersistence with this mod
Charge taken but action failed Disk write failed; the mod refunds automatically If the refund also failed, the log has an ERROR line with the UUID and amount; refund by hand

Maintainer notes

  • Pair with catchcombopersistence. Pixelmon keeps the live combo in unsaved transient data. Without the sibling mod a withdrawn combo is lost at the next disconnect. This mod detects it and flushes the combo to disk after every deposit, withdrawal, and swap.
  • Money safety. Each action validates everything before charging, so only the disk write can fail after the charge. A deposit clears the live combo, then writes the file (a failed write restores and refunds). A withdrawal writes the file, then sets the live combo. A failure loses nothing instead of duplicating a combo.
  • Charges are tagged for EconomyWarehouseBridge: catchcombobank_deposit, catchcombobank_swap, catchcombobank_withdraw, catchcombobank_refund.
  • Admin nodes default to operator, not nobody. Staff are ops, and a node registered with Bukkit as PermissionDefault.FALSE would deny ops on Youer. Granting a node in LuckPerms still works for non-ops. Nodes are mirrored into Bukkit so LuckPerms can tab-complete them (cosmetic only).
  • Rank rungs keyed on group.* are not mirrored into Bukkit on purpose.

Building

./gradlew compileJava   # fast fail
./gradlew build         # jar plus 90 JUnit 5 tests

The jar lands in build/libs/. Tests cover the rules, slot math, ladder, account, and file store. The Pixelmon, Bukkit, and menu paths need a Youer server.

Full command, permission and config tables: Reference.