Skip to content

SubPlugins

AzureDoom edited this page Jun 8, 2026 · 1 revision

SubPlugins

The plugin supports declaring sub-plugins that are bundled within your main mod. Sub-plugins appear in manifest.json as a SubPlugins array and are loaded by the server alongside the parent mod.

Use the subPlugin(...) DSL method in your hytaleTools block:

hytaleTools {
    modId = 'mymod'
    mainClass = 'com.example.mods.MyMod'
 
    subPlugin('Forestry', 'com.example.mods.forestry.ForestryPlugin')
    subPlugin('Economy', 'com.example.mods.economy.EconomyPlugin', true, false)
    // Pin a specific server version for this sub-plugin instead of inheriting the parent's:
    subPlugin('Legacy', 'com.example.mods.legacy.LegacyPlugin', false, false, '>=0.5.2')
}

subPlugin parameters

Parameter Type Default Description
name String Sub-plugin name (maps to Name in the manifest)
main String Fully-qualified entry point class (maps to Main)
disabledByDefault boolean false Whether this sub-plugin is disabled by default
includesAssetPack boolean false Whether this sub-plugin includes an asset pack
serverVersion String null Optional server version override. When omitted, the parent mod's manifest ServerVersion is used

Each declared sub-plugin is written into manifest.json with the parent manifest ServerVersion automatically applied unless a sub-plugin-specific serverVersion is provided:

{
  "SubPlugins": [
    {
      "Name": "Forestry",
      "Main": "com.example.mods.forestry.ForestryPlugin",
      "ServerVersion": ">=0.5.2",
      "DisabledByDefault": false,
      "IncludesAssetPack": false
    },
    {
      "Name": "Economy",
      "Main": "com.example.mods.economy.EconomyPlugin",
      "ServerVersion": ">=0.5.2",
      "DisabledByDefault": true,
      "IncludesAssetPack": false
    }
  ]
}

If no sub-plugins are declared, the SubPlugins key is omitted from the manifest entirely.


Home | Task Reference | Troubleshooting

Clone this wiki locally