Skip to content

Updating and backups

Treat a GreatNPC update as a server-data update as well as a JAR replacement. Placed NPCs, reusable presets, local overrides, player history, and saved preset-item files live in different places.

Make a recoverable backup

Stop the dedicated server, or save and exit the single-player world, before copying its live data.

Back up:

  • The complete Minecraft world directory, including dimensions and entity data.
  • The complete config/greatnpc directory, not only its preset folder.
  • The current GreatNPC JAR and the dependency/modpack versions used with it.
  • Custom resource packs, skin/model resources, and language packs used by the map.
  • The external database, if MySQL/MariaDB storage is enabled.
  • logs/greatnpc/battles if you need to preserve the audit trail.

A saved preset item references a file in config/greatnpc/item_presets. Keeping the item in a world backup without its corresponding file does not recover that snapshot.

The preset manager's config/greatnpc/backups folder protects specific file operations. It is not a complete world/database backup.

Replace the build

  1. Confirm the new build matches the instance's Minecraft, Fabric, Java, and Cobblemon versions.
  2. Remove the old GreatNPC distribution from mods and add the new distribution JAR. Keep the old JAR with the backup.
  3. Update matching client installations when client code or networking changes.
  4. Avoid adding duplicate standalone copies of libraries already bundled inside the distribution.
  5. Start a copy of the backed-up world/server first.
  6. Inspect startup logs and run the checks below before updating the live map.

Do not install a -sources.jar as the playable mod. Compilation alone does not verify every optional mod combination or custom NPC model.

Check the updated instance

Check What to verify
Startup No missing dependencies, broken mixins, or preset/team load errors
Existing character Name, skin/model, equipment, local pose, and position remain correct
Editor Opens on the client; save and close behave as expected
Movement Move an NPC, then test wander, stopping, and its updated home
Battle Start and finish a test battle with a healthy player party
Progression Wins, attempt limits, prerequisites, and cooldowns match the saved state
Shop Costs and rewards are correct, and limits persist
Preset copies A saved preset item still finds its snapshot file
Language Your resource-pack locale loads and labels are readable

Use a test character/player history where needed so testing does not consume a live one-attempt encounter.

Reload versus restart

After editing trainer preset or shared team files:

/gnpc reload

This command does not install new Java code, change the running JAR, or reload every client resource. Replace a mod JAR with the game/server stopped and then restart. Reload a resource pack through Minecraft's normal resource/language workflow.

If automatic preset reload is enabled, file edits can take effect without a manual reload command. Keep a backup before overwriting live files.

Keep IDs stable

Battle history uses the trainer ID and player UUID. Renaming a preset, changing an NPC's source identity, or exporting it to a new ID can change which history record is used. Use the preset manager's supported category operations when reorganizing, then test on a server copy.

Change only the display name when you want a new visible name without intentionally changing the trainer identity.

Keep legacy files and database tables in your backup until the update is verified and you no longer need a rollback.

Roll back

Stop the updated instance. Restore the old JAR/dependency set together with the corresponding world, configuration, resource, and database backup. Restoring only the old mod file does not reverse data already saved by a newer instance.