Add per-world listing and existence checks to the RocksDB player data store #13

Merged
NotAlexNoyle merged 2 commits from ver/1.19.4 into ver/1.19.4 2026-09-19 09:02:36 -04:00
NotAlexNoyle commented 2026-09-18 15:27:24 -04:00 (Migrated from github.com)

MyWorlds support

  • getSeenPlayersCustom(world) — MyWorlds' /world inventory migrate storage|main rewrites every player's record for a world. With .dat files it listed the folder; there was no way to list a world family.
  • hasPlayerData(uuid) / hasPlayerDataCustom(world, uuid) — MyWorlds checks "has this player been here before" on join (hasPlayedBefore) and on every portal / /tpp target (last-position validity). Doing that through getPlayerData* meant a full NBT parse plus data converter pass per check.
  • getPlayerDataCustom no longer creates a column family on read — MyWorlds probes the destination world's record on every cross-world teleport, so every world a player ever aimed at gained an empty family.
  • migrate() uses a timestamped name if playerdatamigrated already exists — MyWorlds renames its own folders the same way; a restored backup or retried first boot must not stop the server.

Tested on a 1101-player dataset with MyWorlds importing per-world folders; counts matched, restarts clean.

MyWorlds support - getSeenPlayersCustom(world) — MyWorlds' /world inventory migrate storage|main rewrites every player's record for a world. With .dat files it listed the folder; there was no way to list a world family. - hasPlayerData(uuid) / hasPlayerDataCustom(world, uuid) — MyWorlds checks "has this player been here before" on join (hasPlayedBefore) and on every portal / /tpp target (last-position validity). Doing that through getPlayerData* meant a full NBT parse plus data converter pass per check. - getPlayerDataCustom no longer creates a column family on read — MyWorlds probes the destination world's record on every cross-world teleport, so every world a player ever aimed at gained an empty family. - migrate() uses a timestamped name if playerdatamigrated already exists — MyWorlds renames its own folders the same way; a restored backup or retried first boot must not stop the server. Tested on a 1101-player dataset with MyWorlds importing per-world folders; counts matched, restarts clean.
SKBotNL (Migrated from github.com) reviewed 2026-09-18 15:27:24 -04:00
Sign in to join this conversation.