Basically, the way it is currently implemented, it allows users to run any additional operation right after a server pack was generated.
ServerPackCreator runs every addon found in the addons-folder and of which its config identifies it as a serverpack addon right at the end of the creation of a server pack and before the GUI opens the prompt for whether you want to open the folder in which your newly generated server pack resides in.
The example above is a simple one, but it shows you how to handle the configuration passed by ServerPackCreator and how to work with an addon-specific config, too. The README of said example also shows you how the output to the addons.log-file would look like.
There are things which people want to do with their server packs which could most certainly be automated. Some of those things so special, or maybe out of place, that they would not warrant a separate feature for ServerPackCreator itself.
It may also be that it is such a niche feature, that I either don’t have the time to code it in, or simply don’t want to. Maybe it doesn’t fit into the overall design of ServerPackCreator, too. Who knows, it could be any of those reasons or another.
Hence, the addon functionality.
This allows people to write their own addons to expand the functionality of ServerPackCreator with their own features as they see fit or want.
One example would be: Automatic setup of a server pack for BlueMap. An addon could check all mods in the specified modpacks mods-directory for textures, and if any are found, add them to BlueMap’s resourcepack folder
config/bluemap/resourcepacks, install BlueMap for the specified Minecraft and Forge/Fabric version and voilà! ServerPackCreator has BlueMap Support Automation functionality, thanks to an addon, without having to wait for me to write it and add it to ServerPackCreators core-functionality for you!