A Paper/Folia utility plugin providing runtime world (level) management — creating worlds at run time and unloading them asynchronously — backed by version-specific NMS modules that are selected automatically for the running server.
- Runtime world creation — create (or re-add) worlds from a
WorldCreatorat run time, including custom generators / biome providers and legacy CraftBukkit world-folder migration. - Asynchronous world unloading — safely unload a non-default world on regionized (Folia-style) servers: regions are shut down, pending teleports completed, chunks and level data saved, player inventories closed, and leftover players disconnected. This runs on a modified region shutdown thread injected at startup.
| Server version | NMS module |
|---|---|
| 26.1.2 | nms/26_1_2 |
| 26.2 | nms/26_2 |
| 26.3 | nms/26_3 |
The module is picked automatically at runtime by ModuleLookup from Bukkit.getMinecraftVersion().
Matching is exact: versions without a listed NMS module are not supported, and there is no
nearest-version fallback.
- Java 25
- Paper or Folia 26.1.2+ (
folia-supported: true)
./gradlew buildThe shaded plugin jar is written to build/libs/MikaUtils-<version>-all.jar.
The first build downloads and remaps the server jars through paperweight-userdev and can take a while; later builds reuse the cache.
LevelLoadingHelper helper = ModuleLookup.getLevelLoadingHelper();
// create a world at runtime (must run on the global tick thread)
World world = helper.createWorld(new WorldCreator("my_world")
.environment(World.Environment.NORMAL)
.seed(42));
// unload it asynchronously
helper.unloadWorldAsync(world, (success, error) -> {
// called when the unload finishes
});createWorldmust be called on the global tick thread. It returns the already loaded world when one with the same name or key exists, andnullwhen creation failed (e.g. the world uuid was already registered).unloadWorldAsyncrefuses to unload the overworld or a world that still has players; the callback receives(false, null)when the unload was rejected,(true, null)on success and(false, error)when the unload failed.
- World management API usage — creation, unloading, callback values, and threading.
- Architecture and version modules — bootstrap, class-loader boundaries, unload internals, and the checklist for adding a Minecraft version.
Generate the API documentation with:
./gradlew javadocJavadoc is written to each module's build/docs/javadoc/ directory.
nms/base shared API (LevelLoadingHelper)
nms/26_1_2 NMS module for 26.1.2
nms/26_2 NMS module for 26.2
nms/26_3 NMS module for 26.3
src/main plugin entry point and version dispatch (ModuleLookup)
Apache License 2.0 — Copyright 2026 EilsapMC.