Interface PluginMetadata


@Immutable public interface PluginMetadata
An immutable implementation of Mods.ModMeta.
  • Method Details

    • builder

      static PluginMetadata.Builder builder()
      Returns a new PluginMetadata.Builder instance.
    • builder

      static PluginMetadata.Builder builder(PluginMetadata metadata)
      Returns a new PluginMetadata.Builder instance from the given PluginMetadata.
      Parameters:
      metadata - the PluginMetadata to create the builder from
      Returns:
      the created PluginMetadata.Builder
    • from

      static PluginMetadata from(mindustry.mod.Mods.ModMeta meta)
      Creates a new PluginMetadata from a Mods.ModMeta.
      Parameters:
      meta - the Mods.ModMeta to create the PluginMetadata from
      Returns:
      the created PluginMetadata
    • from

      static PluginMetadata from(mindustry.mod.Plugin plugin)
      Returns the plugin descriptor of the given plugin.
      Parameters:
      plugin - the plugin to get the descriptor from
      Returns:
      the descriptor of the given plugin
    • from

      static PluginMetadata from(Class<? extends mindustry.mod.Plugin> clazz)
      Returns the plugin descriptor of the given plugin class.
      Parameters:
      clazz - the plugin class to get the descriptor from
      Returns:
      the descriptor of the given plugin class
      Throws:
      RuntimeException - if the plugin descriptor is missing or invalid
    • from

      static PluginMetadata from(ClassLoader classLoader) throws IOException
      Returns the plugin descriptor of the given class loader.
      Parameters:
      classLoader - the class loader to get the descriptor from
      Returns:
      the descriptor of the given class loader
      Throws:
      IOException - if the plugin metadata is missing or invalid
    • getName

      String getName()
      Returns the name of the plugin.
    • getDisplayName

      @Default default String getDisplayName()
      Returns the display name of the plugin.
    • getAuthor

      @Default default String getAuthor()
      Returns the author of the plugin.
    • getDescription

      @Default default String getDescription()
      Returns the description of the plugin.
    • getVersion

      @Default default String getVersion()
      Returns the version of the plugin.
    • getMainClass

      String getMainClass()
      Returns the main class of the plugin.
    • getMinGameVersion

      @Default default int getMinGameVersion()
      Returns the minimum game version required by the plugin.
    • getRepository

      @Default default String getRepository()
      Returns the GitHub repository of the plugin. Empty if not specified.
    • getDependencies

      @Default default List<String> getDependencies()
      Returns the dependencies of the plugin.
    • getSoftDependencies

      @Default default List<String> getSoftDependencies()
      Returns the soft dependencies of the plugin.