Table of Contents

Interface IModLoader

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public interface IModLoader

Properties

Mods

Gets a collection of all enabled mods.

IEnumerable<Mod> Mods { get; }

Property Value

IEnumerable<Mod>

Systems

Gets a collection of all loaded and enabled mod systems.

IEnumerable<ModSystem> Systems { get; }

Property Value

IEnumerable<ModSystem>

Methods

GetMod(string)

Gets the enabled mod with the specified mod ID (domain). Returns null if no mod with that mod ID was found.

Mod GetMod(string modID)

Parameters

modID string

Returns

Mod

GetModSystem(string)

Gets a loaded mod system with the specified full name, that is the namespace and class name, for example "Vintagestory.ServerMods.Core" for the survival mod. Returns null if no mod with that name was found.

ModSystem GetModSystem(string fullName)

Parameters

fullName string

Returns

ModSystem

GetModSystem<T>(bool)

Gets a loaded mod system with the specified type. Returns null if no mod of that type was found.

T GetModSystem<T>(bool withInheritance = true) where T : ModSystem

Parameters

withInheritance bool

Returns

T

Type Parameters

T

IsModEnabled(string)

Returns if the mod with the specified mod ID (domain) is enabled.

bool IsModEnabled(string modID)

Parameters

modID string

Returns

bool

IsModSystemEnabled(string)

Returns if the mod system with the specified full name is loaded and enabled.

bool IsModSystemEnabled(string fullName)

Parameters

fullName string

Returns

bool