Class FabricModInfoProvider
java.lang.Object
com.thecsdev.commonmc.api.util.modinfo.ModInfoProvider
com.thecsdev.commonmc.fabric.util.modinfo.FabricModInfoProvider
Provides information about currently installed mods
on the Fabric mod loader platform.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal @NotNull String[]Returns an array of all currently installed mod IDs/namespaces.final @NotNull ModInfogetModInfo(@NotNull String modid) Returns theModInfoobject for a given currently installed mod, ornullif no such mod is installed.final booleanisModLoaded(@NotNull String modid) Returns whether a mod with the given ID/namespace is currently installed.Methods inherited from class ModInfoProvider
getInstance, getModpackID, setInstance
-
Constructor Details
-
FabricModInfoProvider
public FabricModInfoProvider()
-
-
Method Details
-
getModInfo
@NotNull public final @NotNull ModInfo getModInfo(@NotNull @NotNull String modid) throws NullPointerException, NoSuchElementException Description copied from class:ModInfoProviderReturns theModInfoobject for a given currently installed mod, ornullif no such mod is installed.- Specified by:
getModInfoin classModInfoProvider- Parameters:
modid- The unique namespace/ID of the mod.- Throws:
NullPointerException- When the argument isnull.NoSuchElementException- When no mod with the given ID/namespace is installed.
-
getLoadedModIDs
Description copied from class:ModInfoProviderReturns an array of all currently installed mod IDs/namespaces.- Specified by:
getLoadedModIDsin classModInfoProvider
-
isModLoaded
Description copied from class:ModInfoProviderReturns whether a mod with the given ID/namespace is currently installed.- Specified by:
isModLoadedin classModInfoProvider- Parameters:
modid- The unique namespace/ID of the mod.- Throws:
NullPointerException- When the argument isnull.
-