Class LazyLib

All Implemented Interfaces:
ModPlugin

public class LazyLib extends BaseModPlugin
Contains information on the current version of LazyLib.
Since:
1.1
Author:
LazyWizard
  • Field Details

  • 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

      public static String 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:
      true if results caching is enabled, false otherwise.
      Since:
      1.8b
    • getInfo

      public static String getInfo()
      Gets the library information (for startup messages, etc).
      Returns:
      A String containing information on the library.
      Since:
      1.2
    • getLogLevel

      public static Level getLogLevel()
      Returns the log level used for all other LazyLib classes. LazyLib itself will always use log level Level.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 a RuntimeException so 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

      public void onApplicationLoad() throws Exception
      Specified by:
      onApplicationLoad in interface ModPlugin
      Overrides:
      onApplicationLoad in class BaseModPlugin
      Throws:
      Exception