Interface PlatformHelper
- All Known Implementing Classes:
FabricPlatformHelper
public interface PlatformHelper
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringGets the name of the environment type as a string.getModVersion(String modId) Gets the version string of a mod if it is loadedGets the name of the current platformbooleanCheck if the game is currently in a development environment.booleanisModLoaded(String modId) Checks if a mod with the given id is loaded.booleanisVersionWithin(String version, String set) Gets the version string of a mod if it is loaded
-
Method Details
-
getPlatformName
String getPlatformName()Gets the name of the current platform- Returns:
- The name of the current platform.
-
getConfigPath
Path getConfigPath() -
isModLoaded
Checks if a mod with the given id is loaded.- Parameters:
modId- The mod to check if it is loaded.- Returns:
- True if the mod is loaded, false otherwise.
-
getModVersion
Gets the version string of a mod if it is loaded- Parameters:
modId- The mod to check if it is loaded.- Returns:
- The version string of the mod if it is loaded, or an empty string if it is not.
-
isVersionWithin
Gets the version string of a mod if it is loaded- Parameters:
version- The mod to check if it is loaded.- Returns:
- The version string of the mod if it is loaded, or an empty string if it is not.
-
isDevelopmentEnvironment
boolean isDevelopmentEnvironment()Check if the game is currently in a development environment.- Returns:
- True if in a development environment, false otherwise.
-
getEnvironmentName
Gets the name of the environment type as a string.- Returns:
- The name of the environment type.
-