Interface LoaderUtil
- All Known Implementing Classes:
LoaderUtilImpl
public interface LoaderUtil
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfacestatic interface -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Pathstatic Pathstatic @Nullable StringProvides the current mod loader's name/branding.static Stringstatic Pathstatic booleanbooleanstatic booleanbooleanstatic voidsendMessagesToAdminsOnJoin(Supplier<MonkeyLibText[]> messageSupplier) Sends the messages supplied by the provided supplier to admins when they join.voidsendMessagesToAdminsOnJoinImpl(Supplier<MonkeyLibText[]> messageSupplier)
-
Field Details
-
INSTANCE
-
-
Method Details
-
getMinecraftVersion
-
getLoaderName
Provides the current mod loader's name/branding.When running on client, it's fine to call this whenever.
When running on server, calling this before the SERVER_STARTING event has been invoked will return an empty string.- Returns:
- the current mod loader's name/branding or an empty string when called on a dedicated server before it has started starting.
-
getConfigDir
-
getModsDir
-
getGameDir
-
isDevelopmentEnvironment
static boolean isDevelopmentEnvironment() -
isDedicatedServer
static boolean isDedicatedServer() -
sendMessagesToAdminsOnJoin
Sends the messages supplied by the provided supplier to admins when they join.
Also sends the message(s) on singleplayer start- Parameters:
messageSupplier- called to get the messages to send
-
getMinecraftVersionImpl
-
getConfigDirImpl
-
getModsDirImpl
-
getGameDirImpl
-
isDevelopmentEnvironmentImpl
-
isDedicatedServerImpl
-
sendMessagesToAdminsOnJoinImpl
-