Skip to content

Catch Combo Persistence

Saves each player's Pixelmon catch combo so it survives logouts, restarts and crashes. Without it, Pixelmon resets the combo to zero every time.

What it does

  • Pixelmon keeps the catch combo only in memory. After a disconnect or restart it starts at zero.
  • This mod writes the combo (species and count) to disk every time it changes: after each capture, when the combo is cleared (for example by battling a different wild species), on logout, and on a normal server stop.
  • On login it puts the saved combo back.
  • It does not change Pixelmon's rules for building or breaking a combo.

Server-side only. Clients install nothing. Catch Combo Bank uses it to save banked combos straight away.

How players use it

Players do not interact with this mod. Their combo is simply still there after they log back in.

Staff guide

There are no commands. To check a player's saved combo, read their file (see below). To reset it, wait until the player is offline, then delete their file.

Configuration

None.

Data and storage

One small file per player:

<world>/data/catchcombopersistence/<uuid>.properties

It holds a format version, the National Pokedex number (speciesDex) and the count. Each write goes to a temporary file first and is then renamed over the old one, so a crash cannot leave half a file. An empty combo is written as an empty combo, not deleted, so a crash cannot bring back an old one. A missing file means no combo. A broken file is logged and treated as no combo.

Only edit a file while that player is offline. The mod overwrites it on their next capture.

Troubleshooting

Symptom Cause Fix
Combos reset after a restart Mod not loaded Check for Catch Combo Persistence initialized in the boot log
Clients get kicked during login with a missing-mod message A build without displayTest="IGNORE_SERVER_VERSION" Use the current jar. The build checks this
Could not save catch combo for <uuid> in the log Disk or permission problem in the world folder Check free space and file permissions
Pixelmon party storage was unavailable while <player> logged in Pixelmon had not loaded the party yet The combo was not restored for that login. It is still on disk

Boot line that shows it loaded: Catch Combo Persistence initialized.

Maintainer notes

  • Two mixins on Pixelmon's CaptureCombo (onCapture and clearCombo, both at TAIL) save after every change. Saving only on logout or shutdown would lose the latest combo when the JVM crashes.
  • The combo lives in PlayerPartyStorage.transientData.captureCombo, which is not part of Pixelmon's saved party data. That is the whole reason this mod exists.
  • displayTest="IGNORE_SERVER_VERSION" in the mod metadata is required. Dependencies marked side="SERVER" alone do not stop the client from requiring the mod during the login handshake. The first test build left it out and every client was disconnected. The Gradle task verifyServerOnlyMetadata now checks it.
  • Nineteen unit tests cover missing and broken files, round trips, maximum counts, player isolation, overwrite on clear, and temp-file cleanup.

Building

./gradlew clean test build

Output: build/libs/catchcombopersistence-<version>.jar.

Full command, permission and config tables: Reference.