Package com.bleudev.ppl_utils
Class PlatformHelper
java.lang.Object
com.bleudev.ppl_utils.PlatformHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetModAuthors(String modId) Get authors names of mod which has specifiedmodIdstatic StringgetModName(String modId) Get name (not ID!)static StringgetModVersion(String modId) Get version string of mod which has specifiedmodIdstatic StringgetModVersion(String modId, String before) Get version substring before first occurrence ofbeforeof mod which has specifiedmodId
-
Constructor Details
-
PlatformHelper
public PlatformHelper()
-
-
Method Details
-
getModVersion
Get version string of mod which has specifiedmodId- Parameters:
modId- ID of mod where to get version- Returns:
- Mod version
-
getModVersion
Get version substring before first occurrence ofbeforeof mod which has specifiedmodId- Parameters:
modId- ID of mod where to get versionbefore- String that is the end of a substring (exclusive). If it isn't in the string, the function will return the result ofgetModVersion(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
Get name (not ID!) of mod which has specifiedmodId- Parameters:
modId- ID of mod where to get name- Returns:
- Mod name
-
getModAuthors
Get authors names of mod which has specifiedmodId- Parameters:
modId- ID of mod where to get authors- Returns:
- Mod authors names
-