ExtensionConfigPanel

abstract class ExtensionConfigPanel(val versionMeta: VersionMeta, val apiProperties: ApiProperties, val utilities: Utilities, val serverPackConfigTab: ServerPackConfigTab, var pluginConfig: Optional<CommentedConfig>, val extensionName: String, val pluginID: String) : JPanel(source)

Template ConfigPanel for use in {@link ConfigPanelExtension} extensions.

Author

Griefed

Parameters

versionMeta

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

apiProperties

Instance of Properties 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 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 ID of the plugin providing this extension implementation. The pluginID determines which extension specific configurations are provided to this panel, and how they are stored in a given serverpackcreator.conf.

Constructors

Link copied to clipboard
protected constructor(versionMeta: VersionMeta, apiProperties: ApiProperties, utilities: Utilities, serverPackConfigTab: ServerPackConfigTab, pluginConfig: Optional<CommentedConfig>, extensionName: String, pluginID: String)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected val log: KotlinLogger
Link copied to clipboard
protected var pluginConfig: Optional<CommentedConfig>
Link copied to clipboard
Link copied to clipboard
protected val pluginsLog: Logger
Link copied to clipboard
Link copied to clipboard
val serverPackExtensionConfig: ArrayList<CommentedConfig>
Link copied to clipboard
protected val utilities: Utilities
Link copied to clipboard
protected val versionMeta: VersionMeta

Functions

Link copied to clipboard
abstract fun clear()

Clear the interface, or in other words, reset this extensions config panel UI. If your Config Panel Extensions has no elements you wish to reset, then simply overwrite this method with an empty method body.

Link copied to clipboard
abstract fun serverPackExtensionConfig(): ArrayList<CommentedConfig>

Retrieve this extensions' server pack specific configuration. When no configuration with configs for this extension has been loaded yet, the returned list is empty. Fill it with life!

Link copied to clipboard
abstract fun setServerPackExtensionConfig(serverPackExtensionConfig: ArrayList<CommentedConfig>)

Pass the extension configuration to the configuration panel, so it can then, in turn, load the available configurations and make them editable, if so desired.