Class ModInfo

java.lang.Object
com.thecsdev.commonmc.api.util.modinfo.ModInfo
Direct Known Subclasses:
FabricModInfo, NeoForgeModInfo

public abstract class ModInfo extends Object
Represents basic information about a currently installed mod.
  • Constructor Details

  • Method Details

    • getID

      @NotNull public final @NotNull String getID()
      Returns the ID/namespace of this mod.
      See Also:
      • Identifier.getNamespace()
    • getName

      @NotNull public abstract @NotNull net.minecraft.network.chat.Component getName()
      Returns the display name of this mod. If the mod does not have a display name, returns the mod's getID() as a text Component.
    • getVersion

      @NotNull public abstract @NotNull String getVersion()
      Returns the version of this mod as a String. The format of the this String may vary depending on the mod and its mod-loader (Fabric/Forge/etc).