Skip to content
EilsapMCPublic

About

Simple utilities of folia, formerly known as ZetaUtils

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

MikaUtils

Build

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.

Features

  • Runtime world creation — create (or re-add) worlds from a WorldCreator at 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.

Supported versions

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.

Requirements

  • Java 25
  • Paper or Folia 26.1.2+ (folia-supported: true)

Building

./gradlew build

The 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.

Usage

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
});
  • createWorld must be called on the global tick thread. It returns the already loaded world when one with the same name or key exists, and null when creation failed (e.g. the world uuid was already registered).
  • unloadWorldAsync refuses 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.

Documentation

Generate the API documentation with:

./gradlew javadoc

Javadoc is written to each module's build/docs/javadoc/ directory.

Project layout

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)

License

Apache License 2.0 — Copyright 2026 EilsapMC.

About

Simple utilities of folia, formerly known as ZetaUtils

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages