Interface PluginMetadata
@Immutable
public interface PluginMetadata
A immutable implementation of
Mods.ModMeta.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic PluginMetadata.Builderbuilder()Returns a newPluginMetadata.Builderinstance.static PluginMetadata.Builderbuilder(PluginMetadata metadata) Returns a newPluginMetadata.Builderinstance from the givenPluginMetadata.static PluginMetadataReturns the plugin descriptor of the given plugin class.static PluginMetadatafrom(ClassLoader classLoader) Returns the plugin descriptor of the given class loader.static PluginMetadatafrom(mindustry.mod.Mods.ModMeta meta) Creates a newPluginMetadatafrom aMods.ModMeta.static PluginMetadatafrom(mindustry.mod.Plugin plugin) Returns the plugin descriptor of the given plugin.default StringReturns the author of the plugin.Returns the dependencies of the plugin.default StringReturns the description of the plugin.default StringReturns the display name of the plugin.Returns the main class of the plugin.default intReturns the minimum game version required by the plugin.getName()Returns the name of the plugin.default StringReturns the GitHub repository of the plugin.Returns the soft dependencies of the plugin.default StringReturns the version of the plugin.
-
Method Details
-
builder
Returns a newPluginMetadata.Builderinstance. -
builder
Returns a newPluginMetadata.Builderinstance from the givenPluginMetadata.- Parameters:
metadata- thePluginMetadatato create the builder from- Returns:
- the created
PluginMetadata.Builder
-
from
Creates a newPluginMetadatafrom aMods.ModMeta.- Parameters:
meta- theMods.ModMetato create thePluginMetadatafrom- Returns:
- the created
PluginMetadata
-
from
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
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
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
Returns the display name of the plugin. -
getAuthor
Returns the author of the plugin. -
getDescription
Returns the description of the plugin. -
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
Returns the GitHub repository of the plugin. Empty if not specified. -
getDependencies
Returns the dependencies of the plugin. -
getSoftDependencies
Returns the soft dependencies of the plugin.
-