A lavalink plugin written to add Bilibili as an additional audio playing source.
This plugin is rebuilt for latest Lavalink (v4) based on (Allvaa/lp-sources, 2022).
Differences:
- Removed unknown & unresolvable build dependencies.
artworkUrlextraction from Bilibili videos.- Support for older bilibili videos that uses
aidvideoId.
In your application.yml, add the following dependency under lavalink/plugins section.
...
lavalink:
plugins:
- dependency: "com.github.hoyiliang:lavabili-plugin:<jitpack_build_id>"
snapshot: false
repository: "https://jitpack.io"
...
Then, under lavalink/server/sources section, add bilibili: true.
...
lavalink:
server:
sources:
bilibili: true
...
Note: The decision to use MIT License is derived from (Allvaa/lp-sources, 2022).
Note: This project has been converted to use Kotlin 1.8.22.
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.pluginto your package name - Rename the class
ExamplePluginto your plugin name - Rename the file
ExamplePlugin.javato your plugin name - fill in the
lavalinkPluginin build.gradle.kts - Write your plugin
- Place a
application.ymlfile in the root directory (see here for an example) - 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 runLavalinkagain
- 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.
Go to jitpack and paste the link to your repository. There you can find the version you want to use.
lavalink:
plugins:
- dependency: com.github.lavalink:lavalink-plugin-template:{VERSION} # replace {VERSION} with the version you want to use from jitpack
repository: https://jitpack.ioIf you need help, you can join the Lavalink Discord Server and ask in
the #plugin-dev channel.