Annotation Interface ModId


@Retention(RUNTIME) @Target(TYPE) public @interface ModId
This annotation is used to mark the core of a plugin (mod) and specify its unique identifier. It is required for all mod cores that implement the Core interface.

The ModId annotation ensures that each mod core has a unique identifier, which is crucial for the plugin system to correctly load and manage mods. The identifier is checked for uniqueness, and if any mod core is annotated with a duplicate identifier, an IllegalStateException will be thrown.

If a mod core is not annotated with this annotation, an IllegalArgumentException will be thrown.

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The unique identifier for the mod core.
  • Element Details

    • value

      String value
      The unique identifier for the mod core.
      Returns:
      the mod's unique identifier