Package org.lazywizard.lazylib
Class LazyLib
Object
BaseModPlugin
LazyLib
- All Implemented Interfaces:
ModPlugin
Contains information on the current version of LazyLib.
- Since:
- 1.1
- Author:
- LazyWizard
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetInfo()Gets the library information (for startup messages, etc).static LevelReturns the log level used for all other LazyLib classes.static StringReturns the Starsector release this version was coded for.static floatReturns the running version of LazyLib.static booleanChecks if caching of the results of expensive methods is enabled.voidstatic voidCalled internally by LazyLib when a deprecated method is used.static voidsetLogLevel(Level level) Sets the log level used for all other LazyLib classes.Methods inherited from class BaseModPlugin
afterGameSave, beforeGameSave, configureXStream, onAboutToLinkCodexEntries, onAboutToStartGeneratingCodex, onCodexDataGenerated, onDevModeF8Reload, onEnabled, onGameLoad, onGameSaveFailed, onNewGame, onNewGameAfterEconomyLoad, onNewGameAfterProcGen, onNewGameAfterTimePass, pickDroneAI, pickMissileAI, pickShipAI, pickWeaponAutofireAI
-
Field Details
-
MOD_ID
- See Also:
-
-
Constructor Details
-
LazyLib
public LazyLib()
-
-
Method Details
-
getVersion
public static float getVersion()Returns the running version of LazyLib. If your mod requires features from a certain version of LazyLib, this can be used to warn players that their version is out of date.- Returns:
- The current version of LazyLib, as a
Float. - Since:
- 1.1
-
getSupportedGameVersion
Returns the Starsector release this version was coded for.- Returns:
- The version of Starsector this library supports, as a
String. - Since:
- 1.2
-
isCachingEnabled
public static boolean isCachingEnabled()Checks if caching of the results of expensive methods is enabled.- Returns:
trueif results caching is enabled,falseotherwise.- Since:
- 1.8b
-
getInfo
Gets the library information (for startup messages, etc).- Returns:
- A
Stringcontaining information on the library. - Since:
- 1.2
-
getLogLevel
public static Level getLogLevel()Returns the log level used for all other LazyLib classes.LazyLibitself will always use log levelLevel.ALL.- Returns:
- The current log level for all LazyLib classes.
- Since:
- 1.6b
-
setLogLevel
public static void setLogLevel(Level level) Sets the log level used for all other LazyLib classes.- Parameters:
level- The minimum level of entries that will be logged.- Since:
- 1.6
-
onDeprecatedMethodUsage
public static void onDeprecatedMethodUsage()Called internally by LazyLib when a deprecated method is used. If "logDeprecated" is set in lazylib_settings.json it will log usage of those methods. If "crashOnDeprecated" is true, this method will throw aRuntimeExceptionso modders can track down the problematic code using the stacktrace. You can ignore this method; there's no reason to ever call it manually, and calls from outside of LazyLib's namespace will be ignored.- Since:
- 1.7
-
onApplicationLoad
- Specified by:
onApplicationLoadin interfaceModPlugin- Overrides:
onApplicationLoadin classBaseModPlugin- Throws:
Exception
-