Package com.xpdustry.distributor.plugin
Interface PluginMetadata
@Immutable(builder=true,
copy=false)
public sealed interface PluginMetadata
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic PluginMetadata.Builderbuilder()static PluginMetadata.Builderbuilder(PluginMetadata metadata) 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.Returns the author of the plugin.Returns the dependencies of the plugin.Returns the description of the plugin.Returns the display name of the plugin.Returns the main class of the plugin.intReturns the minimum game version required by the plugin.getName()Returns the name of the plugin.Returns the GitHub repository of the plugin.Returns the soft dependencies of the plugin.Returns the version of the plugin.
-
Method Details
-
builder
-
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
String getDisplayName()Returns the display name of the plugin. -
getAuthor
String getAuthor()Returns the author of the plugin. -
getDescription
String getDescription()Returns the description of the plugin. -
getVersion
String getVersion()Returns the version of the plugin. -
getMainClass
String getMainClass()Returns the main class of the plugin. -
getMinGameVersion
int getMinGameVersion()Returns the minimum game version required by the plugin. -
getRepository
String 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.
-