Package dev.xdpxi.xdlib.api.v3
Class Loader
java.lang.Object
dev.xdpxi.xdlib.api.v3.Loader
The
Loader class provides utility methods to interact with the Fabric mod loader.
It allows checking if a mod is loaded and retrieving the version of a mod.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisModLoaded(String modID) Checks if a mod is loaded by its mod ID.static StringversionOfMod(String modID) Retrieves the version of a mod by its mod ID.
-
Constructor Details
-
Loader
public Loader()
-
-
Method Details
-
isModLoaded
Checks if a mod is loaded by its mod ID.- Parameters:
modID- The ID of the mod to check.- Returns:
trueif the mod is loaded,falseotherwise.
-
versionOfMod
Retrieves the version of a mod by its mod ID. If the mod is loaded, it returns the friendly version string of the mod. If the mod is not loaded, it returnsnull.- Parameters:
modID- The ID of the mod whose version is to be retrieved.- Returns:
- The friendly version string of the mod, or
nullif the mod is not loaded.
-