Interface PlatformHelper
public interface PlatformHelper
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteOnClientOnly(Supplier<Runnable> toRun) voidexecuteOnServerOnly(Supplier<Runnable> toRun) Gets 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.
-
Method Details
-
getPlatformName
String getPlatformName()Gets the name of the current platform- Returns:
- The name of the current platform.
-
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.
-
isDevelopmentEnvironment
boolean isDevelopmentEnvironment()Check if the game is currently in a development environment.- Returns:
- True if in a development environment, false otherwise.
-
getLoadedMods
-
executeOnClientOnly
-
executeOnServerOnly
-