Skip to content

addon.json

Philipp edited this page Jun 22, 2025 · 2 revisions

The addon.json is the first file loaded by the addon system. It contains all Information needed for the startup process of the addon. As of the version 3.4.3 of CraftsNet it may contain the following information:

Flag Description Required Since
name The name of the Addon. (Addon names may only contain lowercase, uppercase chars and numbers) Yes 1.0.0
main The qualified name of the addon class it self. (E.g. de.craftsblock.test.MyAddon) As of version 3.3.5 if this field is not set a hollow addon class will be used. No 1.0.0
description The description of this addon. No 3.0.7
author(s) The author or authors which contributed to create the addon. No 3.0.7
website The website of the addon. No 3.0.7
version The version of the addon. No 3.0.7
depends A list of other addons which this addon requires to function properly. (May only contain the name of the depended addon.) No 3.0.7
softDepends A list of other addons which this addon optionally requires. (May only contain the name of the depended addon.) No 3.3.4
repositories A list of maven repositories which should be used beside the default (mavenCentral and CraftsBlock Repos) when resolving dependencies. No 3.0.7
dependencies A list of dependencies in gradle format (groupID:artifactID:version) which should be resolved and are needed for the addon to work properly. No 3.0.7

Example with all flags set

{
  "name": "MyCoolAddon",
  "main": "MyAddon",
  "author": "CraftsBlock",
  "website": "https://craftsblock.de",
  "description": "My first cool addon written with CraftsNet",
  "version": "1.0.0",
  "depends": [
    "MyOtherCoolAddon"
  ],
  "softDepends": [
    "OptionalCoolAddon"
  ],
  "repositories": [
    "https://example.com"
  ],
  "dependencies": [
    "de.craftsblock.craftscore:sql:3.8.10"
  ]
}

Clone this wiki locally