Package software.bluelib
Class BlueLibCommon
java.lang.Object
software.bluelib.BlueLibCommon
A
public class responsible for common initialization logic and platform detection.
This class contains utility methods to load services, initialize the mod in developer mode, and determine if the current environment is a development environment.
Key Methods:
init()- Initializes BlueLib and logs welcome messages if in developer mode.isDeveloperMode()- Checks if the mod is running in developer mode.
- Since:
- 1.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IPlatformHelperApublic static finalIPlatformHelperinstance that represents the current platform helper loaded for the mod. -
Method Summary
-
Field Details
-
PLATFORM
Apublic static finalIPlatformHelperinstance that represents the current platform helper loaded for the mod. This is used to identify platform-specific functionalities.- Since:
- 1.0.0
-
-
Method Details
-
load
- Type Parameters:
T- The type of the service class to be loaded.- Parameters:
pClazz-Class- The class type of the service to load.- Returns:
- The loaded service instance of type
T. - Throws:
NullPointerException- if the service cannot be found.- Since:
- 1.0.0
-
init
public static void init()Apublic static voidthat initializes BlueLib and logs a thank-you message if in developer mode.
The message is scheduled to appear after 5 seconds and then the scheduler shuts down.- Since:
- 1.0.0
-
isDeveloperMode
public static boolean isDeveloperMode()Apublic staticBooleanthat checks if the mod is running in developer mode.Developer mode is active when the mod is not running in a production environment.
- Returns:
trueif running in developer mode,falseif it isn't.- Since:
- 1.0.0
-