in the [ConfigurationPanel](src/main/java/de/griefed/exampleaddon/gui/panel/ConfigurationPanel.java)- and [Panel](src/main/java/de/griefed/exampleaddon/gui/panel/Panel.java)-classes.
In order for your extension to register correctly, make sure to implement the correct interfaces and use the `@Extension`-annotation on your extension-class.
## 1.3 Tab Extension
**`implements TabExtension`**
Tab extensions allow you to add whole tabs to the GUI of ServerPackCreator. These additional tabs are intended
to let you add textfields and such, which allow you to configure your global addon configuration.
You may add anything you want to it. The sky is the limit!
...
...
@@ -97,7 +105,7 @@ your tab.
Below the big button are some textfields which allow you to change some values of the global addon-wide configuration.
Global addon-configurations are handed to you by ServerPackCreator when the tab is instantiated. The only thing
you need to take care of is to call `saveConfiguration()` from within your tab to save the configuration.
you need to take care of is to call `saveConfiguration()`(see [Tab](src/main/java/de/griefed/exampleaddon/gui/tab/TetrisTab.java) )from within your tab to save the configuration.
The example above simply adds a button `Set values` which does just that.
Global addon-configurations are passed to every extension, along with any available extension-specific configuration,
...
...
@@ -105,8 +113,14 @@ automatically, so you don't have to worry about anything other than actually sav
Maybe have a timer auto-save every few seconds? Your tab, your choice! 😁
See [TetrisTab](src/main/java/de/griefed/exampleaddon/gui/tab/TetrisTab.java) and [Tab](src/main/java/de/griefed/exampleaddon/gui/tab/Tab.java)
## 1.6 Pre Server Pack ZIP-archive Creation Extension
**`implements PreZipExtension`**
The Pre Server Pack ZIP-archive Creation extensions run, as the name implies, *right before* the creation of the server packs ZIP-archive is, or would be,
started. Want to add any files to the ZIP-archive? Or make sure some file doesn't make it into the ZIP-archive?
...
...
@@ -149,10 +173,14 @@ started. Want to add any files to the ZIP-archive? Or make sure some file doesn'
The above example shows the run of a PreZip extension, with the global addon configuration as well as the extension-specific
extension passed to it by ServerPackCreator.
See the `PreZipArchive`-class for details on how the example above was achieved.
See [PreZipArchive](src/main/java/de/griefed/exampleaddon/serverpack/PreZipArchive.java)
Docs: [Pre Zip Extension](https://griefed.github.io/ServerPackCreator/de/griefed/serverpackcreator/addons/serverpackhandler/PreZipExtension.html)
## 1.7 Post Server Pack Generation Extension
**`implements PostGenExtension`**
The Post Server Pack Generation extensions run, as the name implies, *after* the generation of a server pack has finished.
Want to add any files to the server pack, but don't want them to end up in the ZIP-archive? Maybe download,
install and configure DynMap with some renderdata? This would be the place to do that!
...
...
@@ -162,7 +190,11 @@ install and configure DynMap with some renderdata? This would be the place to do
The above example shows the run of a PreGen extension, with the global addon configuration as well as the extension-specific
extension passed to it by ServerPackCreator.
See the `PostGeneration`-class for details on how the example above was achieved.
See [PostGeneration](src/main/java/de/griefed/exampleaddon/serverpack/PostGeneration.java)