quarantineMigrationDebris

public static boolean quarantineMigrationDebris(String worldName)

Detects Paper migration debris and renames the stale legacy folder aside so the next createWorld call does not trigger WorldMigrationSupport.mergeMove. Quarantine name is <name>.paper-migration-backup-<epoch-millis>.

Triggers when Paper would attempt a legacy migration (legacy folder has level.dat or level.dat_old) AND the modern target folder already has any content (which is what causes mergeMove to throw). That covers both the "successfully migrated once but legacy folder still present" case AND the "previous migration failed midway, modern has region files but no level.dat yet" case.

No-op on Spigot, pre-26.1 Paper, fresh installs, and any state where only one of the two layouts holds data.

Return

true if a quarantine actually happened