This is a template for creating a plugin for Lavalink. It is written in
java, but you can also use kotlin (version 1.8.22
) if you want.
- Clone this repository
- Rename the package
com.example.plugin
to your package name - Rename the class
ExamplePlugin
to your plugin name - Rename the file
ExamplePlugin.java
to your plugin name - fill in the
lavalinkPlugin
in build.gradle.kts - Write your plugin
- Place a
application.yml
file in the root directory - Run
./gradlew runLavalink
(for windows:./gradlew.bat runLavalink
) in the root directory - The plugin will be loaded
- You can now test your plugin
- If you change something in the plugin, you can just run
./gradlew runLavalink
again
- Run
./gradlew build
(for windows:./gradlew.bat build
) in the root directory - The jar file will be in
build/libs/
This template uses jitpack to publish the plugin. You just need to push your changes to github and jitpack will build the plugin for you.
lavalink:
plugins:
- dependency: com.github.lavalink:lavalink-plugin-template:{VERSION} # replace {VERSION} with the version you want to use
repository: https://jitpack.io
If you need help, you can join the Lavalink Discord Server and ask in
the #plugin-development
channel.