getPanel

abstract fun getPanel(versionMeta: VersionMeta, apiProperties: ApiProperties, utilities: Utilities, serverPackConfigTab: ServerPackConfigTab, pluginConfig: Optional<CommentedConfig>, extensionName: String, pluginID: String): ExtensionConfigPanel

This method gets called when an extension of this type is run. All parameters are provided by ServerPackCreator, so you do not have to take care of them. A ConfigPanel is intended to be used to change server pack-specific configurations which can then be used by other extensions in your plugin. A simple example would be downloading a specific version of some mod. You could add a panel which lets the user configure the version of the mod to use. When the user then runs the server pack generation, your setting will be stored in the subsequently generated serverpackcreator.conf, and could be used in any of the de.griefed.serverpackcreator.api.serverpack.ServerPackHandler extension-points, which would then download the version you specified via this here panel.

Return

A ConfigPanel allowing users to further customize their ServerPackCreator experience when using a plugin.

Author

Griefed

Parameters

versionMeta

Instance of VersionMeta so you can work with available Minecraft, Forge, Fabric, LegacyFabric and Quilt versions.

apiProperties

Instance of ApiProperties The current configuration of ServerPackCreator, like the default list of clientside-only mods, the server pack directory etc.

utilities

Instance of Utilities commonly used across ServerPackCreator.

serverPackConfigTab

Instance of a class implementing ServerPackConfigTab to give you access to the various fields inside it, like the modpack directory, selected Minecraft, modloader and modloader versions, etc.

pluginConfig

Plugin specific configuration conveniently provided by ServerPackCreator. This is the global configuration of the plugin which provides the ConfigPanelExtension to ServerPackCreator.

extensionName

The name the titled border of this ConfigPanel will get.

pluginID

The same as the PluginId.