The mod manager allows to load, unload and interact with Mods.
You can block loading your Mod if an incompatible mod is detected:
class MyMod extends GDAPI.Mod { constructor() { if(GDAPI.ModManager.has("my/incompatible/mod/uid")) GDAPI.ModManager.unload("my/mod/uid"); } }
You can interact with another mod using its public methods:
class MyMod extends GDAPI.Mod { constructor() { if(GDAPI.ModManager.has("my/compatible/mod/uid")) GDAPI.ModManager.get("my/compatible/mod/uid").setupIntegration(this); } }
Adds a mod to the manager.
The mods UID.
The mod instance to add.
Get a mod by uid.
Get an array of all loaded mods.
Check if a mod is loaded by uid.
Unloads a mod by uid.
The mod manager allows to load, unload and interact with Mods.
You can block loading your Mod if an incompatible mod is detected:
You can interact with another mod using its public methods: