Skip to content

The Velocity plugin file

The velocity-plugin.json file is the configuration file for your plugin. It contains information about your plugin’s name, description, version, main class path, and other.

The velocity-plugin.json file is located in the resources directory of your plugin. It is generated automatically if you configured the Velocity annotation processor and used the @Plugin annotation.

  • Directoryvelocity-plugin/
    • Directorysrc/
      • Directorymain/
        • Directoryjava/
        • Directoryresources/
          • velocity-plugin.json
    • build.gradle.kts
    • settings.gradle.kts

This is an example velocity-plugin.json file:

velocity-plugin.json
{
"id": "example-plugin",
"name": "Velocity Example Plugin",
"version": "1.0.0",
"description": "An example plugin for showcasing the plugin json file.",
"main": "com.velocitypowered.testplugin.TestPluginMain"
}

The only required fields are id and main. Any other fields are optional.

The ID of the plugin. This ID needs to be unique for each plugin.

  • "id": "a_cool_plugin"

Plugin IDs must start with a lowercase letter and may contain lowercase letters, digits, hyphens, and underscores. The total length must not exceed 64 characters.

The path towards your main plugin class.

  • "main": "com.example.yourplugin.PluginMain"

A user-friendly variant of your plugin’s name.

  • "name": "A cool plugin"

The version of your plugin.

  • "version": "0.0.1-beta.7"

The description of your plugin.

  • "description": "Some interesting plugin description."

The URL of your plugin’s website.

  • "url": "https://github.com/PaperMC/Velocity"

A list of your plugin’s authors.

  • "authors": ["Strokkur24", "electronicboy"]

Your plugin’s dependencies. The value of this field is an array of dependency objects.

The dependency object itself has three fields:

  • id the plugin ID of the plugin you depend upon
  • version the version of your dependency. This field is not required.
  • optional whether the dependency is optional. This field is not required. Defaults to false.
{
"dependencies": [
{
"id": "luckperms",
"optional": true
}
]
}