Apis FAQ - Paper Compatibility, Kill-Switches & Benchmarks
Answers on Bukkit and Paper plugin compatibility, addons directory layout, standalone multi-world management, kill-switches NPE safety, Java 25+ AOT cache, and benchmarks.
Are Paper and Bukkit API plugins supported?
Section titled “Are Paper and Bukkit API plugins supported?”Yes. Plugins targeting Paper, Spigot, and Bukkit run as expected.
- No public Bukkit, Spigot, or Paper API methods were removed or had their signatures changed.
apis-apionly adds theServerBuildInfo.BRAND_APIS_IDconstant (apismc:apis), twodefaultmethods for package indexing, and the internalPluginPackageIndex.ServerBuildInfo#isBrandCompatible(Key)returnstruefor bothapismc:apisandpapermc:paper, so plugins checking the Paper brand pass cleanly.
Why are JAR files missing from plugins/?
Section titled “Why are JAR files missing from plugins/?”Apis splits plugin code from plugin config and data directories:
addons/(--addons-dir) - drop plugin.jarfiles here. The auto-update directory is also here ataddons/update/.plugins/(-P/--plugins) - holds only plugin configs and data folders (plugins/<PluginName>/). JAR files left insideplugins/are not loaded.
Check Directory Structure for all directory overrides and CLI flags.
Do I need Multiverse-Core or similar world plugins?
Section titled “Do I need Multiverse-Core or similar world plugins?”No. With dimensions.mode: standalone (the default), the server handles multi-world management out of the box:
- No extra plugins: load, unload, reload, and teleport with
/worldand/tpworldinstead of Multiverse-Core. - Paper migration: move existing world folders from the server root into
worlds/(e.g.,worlds/hub/,worlds/arena_1/). - Auto-discovery: on startup, Apis scans
worlds/and loads every valid world with the lightweight Void generator. - Per-world config (
world.yml): each world gets aworlds/<world_name>/world.yml. Spawn coordinates are not read fromlevel.dat; spawn point,force-spawn, and game mode come fromworld.yml(editable by hand or via/setworldspawn).
How do I restore standard Paper paths and behavior?
Section titled “How do I restore standard Paper paths and behavior?”Set the world mode to vanilla in configs/apis.yml:
dimensions: mode: vanillaTo place configs and worlds back in the server root, pass the standard CLI flags:
java --enable-native-access=ALL-UNNAMED -jar apis.jar \ --configs-dir . \ --worlds-dir . \ -c server.properties \ -b bukkit.yml \ -C commands.yml \ -S spigot.yml \ --paper paper.yml \ --noguijava --enable-native-access=ALL-UNNAMED -jar apis.jar ` --configs-dir . ` --worlds-dir . ` -c server.properties ` -b bukkit.yml ` -C commands.yml ` -S spigot.yml ` --paper paper.yml ` --noguiHow are feature kill-switches implemented?
Section titled “How are feature kill-switches implemented?”Kill-switches work on two levels with no reflection, locks, or runtime YAML overhead:
- Pre-Disk Pruning: boot and registry toggles (
startup.datafixers,gameplay.recipes,gameplay.advancements,gameplay.loot-tables,chunks.structures,chunks.biome-decoration,startup.test-registries) kick in before touching the filesystem.ResourceManagerRegistryLoadTaskandTagLoaderskiplistMatchingResourcesand JSON parsing completely, andDataFixersskips building migration schemas. - Hot Tick Loops (O(1)
FeatureRegistrybitmask): at boot, all 77 boolean keys fromconfigs/apis.ymlpack into two primitivevolatile longfields (disabledMask0anddisabledMask1). Every tick check is a single bitwise op(disabledMask0 & feature.bit) != 0Lwith noHashMap,synchronized, or YAML lookups.
See Kill-Switches for full details.
Will plugins throw NullPointerException if recipes, loot, DFU, or AI are disabled?
Section titled “Will plugins throw NullPointerException if recipes, loot, DFU, or AI are disabled?”No. Apis uses non-null fallback objects instead of setting fields to null:
- Mob AI (
entities.ai.enabled: false):MobandLivingEntitystill allocate empty, validgoalSelector,targetSelector,navigation,sensing, andbraininstances. Only goal registration and ticking are skipped. - Pruned registries (
recipes,advancements,loot-tables,structures):RecipeManagerusesRecipeMap.EMPTYandList.of(),ServerAdvancementManagerusesImmutableMap.of()andnew AdvancementTree(), andMappedRegistry.get(TagKey)returns a cached emptyHolderSet.Named. DanglingHolder.Referenceentries bind during freeze to safe stubs (LootTable.EMPTY,AllOfCondition,SequenceFunction,EmptySlotSource). Ifgameplay.advancements: truewhilechunks.structuresorgameplay.recipesis disabled, dependent advancements and theirparenttrees are softly skipped with one startupWARN. - DFU (
startup.datafixers: false):DATA_FIXERandFILE_FIXERremain non-null using a minimal schema0(ConcurrentHashMap<>+ no-op fixer). Iflevel.dathas an olderDataVersion, one startupWARNis printed. - Lazy block caches (
caches.eager-blockstate-cache: false): when a plugin or server call first touches a block state property, all 15 public and Moonrise getters inBlockBehaviour.BlockStateBaseinitialize caches thread-safely on demand (ensureCacheInitialized()) with reentrancy protection. - Blocked API calls (
createWorld,findNearestMapStructure,getWorld): return normal@Nullablevalues and logApisDiagnostics.warnBlockedpointing straight to the blocking key inconfigs/apis.yml.
Do configs/apis.yml and paper-*.yml, spigot.yml, bukkit.yml conflict?
Section titled “Do configs/apis.yml and paper-*.yml, spigot.yml, bukkit.yml conflict?”No, ApisConfigSync prevents conflicts.
When a setting is managed in configs/apis.yml, Apis overrides the mirrored fields in memory (GlobalConfiguration, WorldConfiguration, SpigotConfig, CraftServer) and strips duplicate keys before writing legacy files to disk:
server.properties:allow-nether,spawn-monsters,spawn-animals,spawn-npcsbukkit.yml:settings.allow-endspigot.yml:advancements.disable-saving,advancements.disabled,players.disable-savingpaper-global.yml&paper-world*.yml:misc.enable-nether,collisions.enable-player-collisions,environment.disable-thunder,environment.disable-ice-and-snow,unsupported-settings.ticking.chunks
Running /apis reload triggers ApisConfigSync.syncAll(server) across all loaded worlds with no restart. See the full table in How ApisConfigSync Works.
Do PluginPackageIndex and Commodore break ByteBuddy or ASM plugins?
Section titled “Do PluginPackageIndex and Commodore break ByteBuddy or ASM plugins?”No. Dynamically generated classes have a built-in fallback:
PluginPackageIndex: indexes packages from each plugin JAR and its libraries at startup soSimpleListPluginClassLoaderGroupskips unrelated loaders in O(1). If a lookup fails and at least one loader was skipped (anySkipped), Apis falls back to checking the skipped loaders and caches the dynamic package (recordDynamicPackage). Plugins using ByteBuddy, ASM, ordefineClasskeep working.Commodore.mayNeedConversion: keeps legacy plugin rewriting intact while pre-scanning the.classheader (0xCAFEBABE) andCONSTANT_Utf8pool entries without allocations. ASMClassReader/ClassWriteris skipped only when none oforg/bukkit/,org/spigotmc/,com/destroystokyo/,io/papermc/,com.mysql.jdbc.Driver, or legacyEnumrenames appear.
Could stale session.lock cleanup break another running server?
Section titled “Could stale session.lock cleanup break another running server?”No. DirectoryLock writes the process PID, start timestamp, and host ID (CURRENT_HOST_ID, incorporating /proc/sys/kernel/random/boot_id on Linux) into session.lock.
tryBreakStaleSessionLock removes session.lock only when both checks pass:
- The host ID matches the current machine (or is absent).
- The recorded
pid(!= currentPid) is dead (ProcessHandle.of(pid).filter(ProcessHandle::isAlive).isEmpty()).
If a world is locked by a live sibling process on the same box or by another host on a shared mount, Apis leaves the lock alone and stops safely with an error.
What startup speed and performance gains show up in benchmarks?
Section titled “What startup speed and performance gains show up in benchmarks?”Apis boots the core engine in under a second (~0.85s). With 9 heavy plugins, it starts ~2x faster and uses nearly half the idle RAM compared to Paper.
Benchmark env (Docker linux/arm64, 4 vCPU, 4 GiB RAM, Java 25, AOT cache, direct 26.3 protocol with 9 plugins: ViaVersion, LuckPerms, KaMenu, FancyNpcs, Skript, emotecraft, TAB, WorldEdit, GrimAC):
- Cold start (
Done): 5.91s best on Apis (6.28s 3-run avg;5.52sin the profiling pass where core init took 0.85s and plugins accounted for the rest inonLoad/onEnable), vs 12.27s on Paper. - Idle RAM: 1021.3 MiB best on Apis (1140.9 MiB avg) vs 1886.7 MiB on Paper.
- 100 bots (90s plateau, 0 kicks/errors): 10.19 ms avg MSPT (186.4% CPU, max GC pause
92.7 - 140.3 ms) vs 27.53 ms on Paper (380.4% CPU, max GC pause516.8 - 573.7 ms). - Stress cap (
60 - 70 msMSPT): Paper exceeded the limit at 150 bots (111.75 ms,12.52 TPS) and crashed at 200, while Apis held 8.59 ms (20.00 TPS) at 200 bots, 32.59 ms (19.9 TPS) at 300 bots, and pushed to 350 bots (64.32 ms,15.4 TPS) with zero kicks or errors. - 250-bot repeatability (3 runs,
4/s): all 3 runs held 250/250 bots (0errors,20.0 TPSsettled), hitting14.80 msbest settled MSPT (16.70 msavg,253.86%CPU). At 12 bots/s burst join, 250/250 stayed online cleanly (20.50 mssettled).
Startup gains come from skipping unused boot work and caches:
- no DFU schema build or background DFU threads
- no parsing ~1100 loot tables, recipes, advancements, or structures
- no boot-time warmup for ~27k+
BlockStateentries or the 16 MBCraftMapColorCache - no Mojang Services Discovery or Paper version-check network calls
cache/.paperclip-stamp, disk-cachedcache/natives/,OSNuma.NoOpoff Linux, and an AOT-friendlyClass-Pathfor Java 25+ AOT Cache
Production boot times still depend heavily on plugins in addons/. See Plugin Impact & Real Benchmarks for the breakdown.
How do I tell if a plugin broke due to moved folders or a kill-switch?
Section titled “How do I tell if a plugin broke due to moved folders or a kill-switch?”Console logs pinpoint it directly:
- If an older plugin looks for a moved root file (
server.properties,bukkit.yml,ops.json,whitelist.json, etc.),ApisDiagnosticscatches the stacktrace and prints a short two-lineERRORnaming the exact symlink to create. - If a plugin hits a disabled API (such as creating a world with
dimensions.custom-worlds: false), you getBlocked plugin '<name>' ... - disabled by <key> in apis.yml. - Run
/apis statusany time to list active restrictions.
How do I update the Apis JAR cleanly?
Section titled “How do I update the Apis JAR cleanly?”- Stop the server with
stopand swap the rootapis-*.jarfor the new release. - No manual cache wiping needed: on first launch of the new JAR, the Paperclip launcher checks manifest hashes (
versions.list,libraries.list,patches.list,download-context) againstcache/.paperclip-stampand refreshesversions/,libraries/, and the stamp automatically. - Settings stay intact:
configs/apis.ymlis not overwritten from scratch; existing choices stay put and new options are appended with defaults. - If using Java 25+ AOT (
cache/apis-cp.aot): rebuild both the AOT config (-XX:AOTMode=record) and cache (-XX:AOTMode=create) after swapping JARs, or the JVM will reject the stale cache or warn about class mismatches.
Does BungeeCord / Velocity forwarding still work?
Section titled “Does BungeeCord / Velocity forwarding still work?”Yes. BungeeCord and Velocity (including Modern Forwarding) work cleanly.
Since configs live under configs/, edit them there:
configs/server.properties: setonline-mode=false.- Velocity (Modern Forwarding): in
configs/paper-global.yml, setproxies.velocity.enabled: true,online-mode: true, and yoursecretmatchingvelocity.toml. - BungeeCord / Waterfall: enable
settings.bungeecord: trueinconfigs/spigot.yml.ApisConfigSyncleaves proxy sections untouched, so forwarding config is never overwritten. - Tip for
configs/apis.yml: behind a proxy, you can setnetwork.generate-keypair: falseto skip RSA key generation and nativeNatives.cipherloading at boot (keys still generate lazily if anything asks for them).
Can I edit apis.yml live without restarting?
Section titled “Can I edit apis.yml live without restarting?”Yes. /apis reload updates most runtime options on the fly (requires apis.admin, default OP).
Running /apis reload does three things without rebooting:
ApisConfig.reload()re-readsconfigs/apis.ymland updatesFeatureRegistrybitmasks immediately.FeatureRegistry.resolveRegistries(...)refreshesentities.ai.type-filterand dimension ticking lists (dimensions.always-ticking,dimensions.never-ticking).ApisConfigSync.syncAll(server)syncs mirrored flags inSpigotConfig,GlobalConfiguration, and every loadedServerLevel#paperConfig().
Applied immediately: ticking toggles, mob AI, collisions, natural spawning, physics, world environment, player mechanics (locator-bar, floating-kick, statistics, etc.), packet-range-clamping, storage.periodic-autosave, storage.world-saving, and messages.commands.
Requires a full restart: cold boot, registry pruning, startup caches, and world mode/init flags (startup.*, caches.*, gameplay.recipes, gameplay.advancements, gameplay.loot-tables, chunks.structures, chunks.biome-decoration, dimensions.mode, dimensions.fallback-world, dimensions.enabled, network.analytics.bstats, network.analytics.spark).