Class PlatformHelper

java.lang.Object
com.bleudev.ppl_utils.PlatformHelper

public class PlatformHelper extends Object
  • Constructor Details

    • PlatformHelper

      public PlatformHelper()
  • Method Details

    • getModVersion

      public static String getModVersion(String modId)
      Get version string of mod which has specified modId
      Parameters:
      modId - ID of mod where to get version
      Returns:
      Mod version
    • getModVersion

      public static String getModVersion(String modId, String before)
      Get version substring before first occurrence of before of mod which has specified modId
      Parameters:
      modId - ID of mod where to get version
      before - String that is the end of a substring (exclusive). If it isn't in the string, the function will return the result of getModVersion(modId)
      Returns:
      Mod version substring
      
       // Example
       v1 = getModVersion(MOD_ID); // 1.0.0+1.21.9
       v2 = getModVersion(MOD_ID, "+"); // 1.0.0
      
       // But
       v3 = getModVersion(MOD_ID, "-"); // 1.0.0+1.21.9
       
    • getModName

      public static String getModName(String modId)
      Get name (not ID!) of mod which has specified modId
      Parameters:
      modId - ID of mod where to get name
      Returns:
      Mod name
    • getModAuthors

      public static List<String> getModAuthors(String modId)
      Get authors names of mod which has specified modId
      Parameters:
      modId - ID of mod where to get authors
      Returns:
      Mod authors names