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. It is located in the resources
directory of your plugin and may be generated automatically, if you configured the Velocity annotation processor
and used a @Plugin annotation somewhere in your code.
Directoryvelocity-plugin/
Directorysrc/
Directorymain/
Directoryjava/
- …
Directoryresources/
- velocity-plugin.json
- build.gradle.kts
- settings.gradle.kts
Example
Section titled “Example”This is an example velocity-plugin.json file:
{ "id": "example-plugin", // required "name": "Velocity Example Plugin", "version": "1.0.0", "description": "An example plugin for showcasing the plugin json file.", "main": "com.example.testplugin.TestPluginMain", // required "url": "https://github.com/PaperMC/docs", "authors": ["Strokkur24"], "dependencies": [ { "id": "luckperms", // required for dependencies "optional": true // defaults to false } ]}Fields
Section titled “Fields”The only required fields are id and main. Any other fields are optional.
-
id
The ID of the plugin. This ID needs to be unique for each plugin. It is used for identifying your plugin internally and also used as the name for your plugin’s logger.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.
{"id": "a_cool_plugin"} -
main
The path towards your main plugin class.{"main": "com.example.yourplugin.PluginMain"} -
name
A user-friendly variant of your plugin’s name. This is used for any user-facing display of your plugin, such as the/velocity pluginscommand.{"name": "A cool plugin"} -
version
The version of your plugin.{"version": "0.0.1-beta.7"} -
description
The description of your plugin.{"description": "Some interesting plugin description."} -
url
The URL of your plugin’s website.{"url": "https://github.com/PaperMC/Velocity"} -
authors
A list of your plugin’s authors.{"authors": ["Strokkur24", "electronicboy"]} -
dependencies
Your plugin’s dependencies. The value of this field is an array of dependency objects.The dependency object itself has two fields:
idthe plugin ID of the plugin you depend uponoptionalwhether the dependency is optional. This field is not required and defaults tofalse.
{"dependencies": [{"id": "luckperms","optional": true}]}