Nitea
package cc.nitea;
public final class Nitea
Methods
init(NiteaOptions options)
static NiteaClient
Creates the client for a mod, or returns the existing one if that mod ID was already initialised. Call it once, at the start of your mod constructor. The first call in the game also starts Nitea's in-game screens and hooks.
NiteaClient nitea = Nitea.init(NiteaOptions.builder("examplemod")
.owner(ExampleMod.class)
.release("1.0.0")
.gameDir(FMLPaths.GAMEDIR.get())
.build());
get(String modId)
static NiteaClient
The client a mod created with init, or null.
SDK key and endpoint lookup
When init runs, the SDK key and API endpoint are resolved in this order:
- The builder:
sdkKey(...),endpoint(...) - System properties:
nitea.<modid>.sdkKey,nitea.<modid>.endpoint - Environment variables:
NITEA_<MODID>_SDK_KEY,NITEA_<MODID>_ENDPOINT - The bundled resource
nitea/<modid>.properties:sdkKey=,endpoint=
The endpoint defaults to https://nitea.cc.
Shutdown
On JVM exit, Nitea waits up to three seconds for every client to send what's still queued.