Class Loader

java.lang.Object
dev.xdpxi.xdlib.api.v3.Loader

public class Loader extends Object
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 Details

    • Loader

      public Loader()
  • Method Details

    • isModLoaded

      public static boolean isModLoaded(String modID)
      Checks if a mod is loaded by its mod ID.
      Parameters:
      modID - The ID of the mod to check.
      Returns:
      true if the mod is loaded, false otherwise.
    • versionOfMod

      public static String versionOfMod(String modID)
      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 returns null.
      Parameters:
      modID - The ID of the mod whose version is to be retrieved.
      Returns:
      The friendly version string of the mod, or null if the mod is not loaded.