WorldFolderResolver

public final class WorldFolderResolver

Resolves legacy world roots and modern per-dimension storage.

Functions

Link copied to clipboard
public static void deleteAllLayouts(String worldName)
Deletes the world's data folder at both legacy and modern layouts.
Link copied to clipboard
public static boolean exists(String worldName)
True iff the world has recognized metadata at either layout.
Link copied to clipboard
public static boolean folderExists(String worldName)
True iff a directory exists at either layout (with or without level.dat).
Link copied to clipboard
public static boolean hasLegacyLayout(String worldName)
True iff a level.dat is present at the legacy path.
Link copied to clipboard
public static boolean hasModernLayout(String worldName)
True iff Paper has migrated this world to the vanilla-style layout (Paper metadata and per-world overrides exist at the dimension path).
Link copied to clipboard
public static Path legacyFolder(String worldName)
Always returns the legacy path: <worldContainer>/<name>/, regardless of whether anything exists there.
Link copied to clipboard
public static Set<String> listAllWorldNames()
Lists every world-folder name visible at the legacy server root OR under the modern dimensions/minecraft directory.
Link copied to clipboard
public static Path modernFolder(String worldName)
Always returns the Paper 26.
Link copied to clipboard
public static Path modernNamespaceRoot()
Resolves the dimension namespace beside the loaded primary dimension, including custom level-name roots.
Link copied to clipboard
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.
Link copied to clipboard
public static File resolve(String worldName)
Returns the live data folder for a world, preferring the modern path when both layouts have world metadata.
Link copied to clipboard
public static boolean usesModernStorage()
The loaded primary world's actual directory establishes the server's storage layout.