Interface ConfigPanelExtension

  • All Implemented Interfaces:
    de.griefed.serverpackcreator.api.plugins.BaseInformation , de.griefed.serverpackcreator.api.plugins.ExtensionInformation , org.pf4j.ExtensionPoint

    
    public interface ConfigPanelExtension
     implements ExtensionInformation
                        

    Extension point for plugins which add additional javax.swing.JPanels in a given server pack tab, allowing users to customize server pack specific configurations of a plugin.

    Author:

    Griefed

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract ExtensionConfigPanel getPanel(VersionMeta versionMeta, ApiProperties apiProperties, Utilities utilities, ServerPackConfigTab serverPackConfigTab, Optional<CommentedConfig> pluginConfig, String extensionName, String pluginID) This method gets called when an extension of this type is run.
      • Methods inherited from class de.griefed.serverpackcreator.api.plugins.ExtensionInformation

        getExtensionId
      • Methods inherited from class de.griefed.serverpackcreator.api.plugins.BaseInformation

        getAuthor, getDescription, getName, getVersion
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getPanel

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

        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.

        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.
        extensionName - The name the titled border of this ConfigPanel will get.
        pluginID - The same as the PluginId.
        Returns:

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