Class BMNConfigDirectory

java.lang.Object
com.technicjelle.BMUtils.BMNative.BMNConfigDirectory

public class BMNConfigDirectory extends Object
BMUtils allocates a config directory for every native BlueMap addon.
Here are functions to retrieve that directory.

The directory name is the addon's ID.
  • Method Details

    • getAllocatedDirectory

      public static Path getAllocatedDirectory(BlueMapAPI api, ClassLoader classLoader) throws IOException
      This function gives you the path to your addon's allocated config directory.
      Parameters:
      api - The BlueMapAPI instance
      classLoader - The class loader of the addon
      Returns:
      The allocated config directory
      Throws:
      IOException - If the directory could not be created
    • getServerConfigDirectory

      public static Path getServerConfigDirectory(BlueMapAPI api)
      Gets the directory where the server stores the mod/plugin configuration directories.
      • Paper & Spigot: /plugins/
      • Forge & Fabric: /config/
      • CLI: ./ (next to the bluemap-(version)-cli.jar)

      Probably shouldn't be used directly, use getAllocatedDirectory(BlueMapAPI, ClassLoader) instead.
      Parameters:
      api - The BlueMapAPI instance
      Returns:
      The server config directory
    • getPacksDirectory

      public static Path getPacksDirectory(BlueMapAPI api)
      Gets the directory where BlueMap Native Addons are stored.
      Probably shouldn't be used directly, use getAllocatedDirectory(BlueMapAPI, ClassLoader) instead.
      Parameters:
      api - The BlueMapAPI instance
      Returns:
      BlueMap's own addons directory