Class LibbyImporter

java.lang.Object
dev.cwhead.GravesX.module.util.LibbyImporter
All Implemented Interfaces:
LibraryImporter

public final class LibbyImporter extends Object implements LibraryImporter
Implements a LibraryImporter that parses Maven-style coordinates and loads libraries for modules using LibraryLoaderUtil.
  • Field Details

  • Constructor Details

    • LibbyImporter

      public LibbyImporter(Graves plugin)
      Creates a new importer bound to the Graves plugin.
      Parameters:
      plugin - Owning Graves plugin.
  • Method Details

    • importLibrary

      public void importLibrary(ModuleContext ctx, String... coordinates)
      Loads libraries described by coordinate strings. Each coordinate is trimmed and ignored if null/empty.
      Specified by:
      importLibrary in interface LibraryImporter
      Parameters:
      ctx - Module context of the caller.
      coordinates - One or more coordinates in the form group:artifact:version[?key=value&...].
    • loadOne

      private void loadOne(String spec)
      Parses a single coordinate string and loads it. Supports query keys: isolated, transitive, repo, id, relocate (format from->to), relocateFrom, relocateto. On parse/load failure, logs the error and disables the plugin.
      Parameters:
      spec - Coordinate string to load.
    • parseBoolean

      private static boolean parseBoolean(String s)
      Parses a human-friendly boolean string. Truthy: "1", "true", "yes", "y" (case-insensitive).
      Parameters:
      s - String to parse.
      Returns:
      True if the value is truthy, otherwise false.