Class ExtensionConfigPanel

  • All Implemented Interfaces:
    java.awt.MenuContainer , java.awt.image.ImageObserver , java.io.Serializable , javax.accessibility.Accessible , javax.swing.TransferHandler.HasGetTransferHandler

    
    public abstract class ExtensionConfigPanel
    extends JPanel
                        

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

    Author:

    Griefed

    • Method Detail

      • getApiProperties

         final ApiProperties getApiProperties()

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

      • getPluginConfig

         final Optional<CommentedConfig> getPluginConfig()

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

      • setPluginConfig

         final Unit setPluginConfig(Optional<CommentedConfig> value)

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

      • getPluginID

         final String getPluginID()

        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.

      • getLog

         final KotlinLogger getLog()
      • getServerPackExtensionConfig

         final ArrayList<CommentedConfig> getServerPackExtensionConfig()

        The panel's current configuration, which SPC stores under the plugin's id in the pack config.

      • serverPackExtensionConfig

         abstract ArrayList<CommentedConfig> serverPackExtensionConfig()

        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!

        Returns the config list to be used in subsequent server pack generation runs, by various other extensions.

      • setServerPackExtensionConfig

         abstract Unit setServerPackExtensionConfig(ArrayList<CommentedConfig> serverPackExtensionConfig)

        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.

      • clear

         abstract Unit clear()

        Resets this panel's inputs to their defaults. Give it an empty body when the panel has nothing to reset.

        No host calls this today. The GUI reaches a panel through ApiPlugins.getConfigPanels and drives it only via serverPackExtensionConfig and setServerPackExtensionConfig. Implement it regardless: it is abstract, so a host may begin calling it without the API changing shape.