Annotation Interface JourneyMapPlugin


@Target(TYPE) @Retention(RUNTIME) public @interface JourneyMapPlugin
Used by JourneyMap to discover and classload plugin classes.

Classes with this annotation must have a no-arg constructor and must also implement the IClientPlugin interface for client plugins or IServerPlugin interface for server plugins.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Mod Devs can supply the version of journeymap-api the mod was built against, so that it will not load the plugin if there is a breaking change.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional list of mod ids this plugin depends on.
    boolean
    Controls how dependencies() is evaluated.
  • Element Details

    • apiVersion

      @Nullable String apiVersion
      Mod Devs can supply the version of journeymap-api the mod was built against, so that it will not load the plugin if there is a breaking change.
      Returns:
      - The Api Version
    • dependencies

      String[] dependencies
      Optional list of mod ids this plugin depends on. When non-empty, JourneyMap evaluates these against the loaded mods according to require(): with require() == true (the default) every listed mod must be loaded; with require() == false at least one must be loaded. An empty array (the default) imposes no dependency requirement - the plugin always loads, which is backwards compatible with plugins built against older API versions.
      Returns:
      - the required mod ids.
      Default:
      {}
    • require

      boolean require
      Controls how dependencies() is evaluated. When true (the default), every listed mod id must be loaded for the plugin to initialize. When false, the plugin initializes if at least one listed mod id is loaded. Has no effect when dependencies() is empty.
      Returns:
      - true to require all dependencies, false to require any one.
      Default:
      true