While optional, it is highly recommended to shade alumina to match your project's namespace; when multiple plugins use alumina on a server, it may produce some unexpected outcomes.
While optional, it is highly recommended to shade alumina to match your project's namespace; when multiple plugins use alumina on a server, it may produce some unexpected outcomes.
Shadow Plugin
The shadow-jar plugin is required to shade alumina into your project.
plugins {
id 'java'
id "com.github.johnrengelman.shadow" version "7.1.2"
}
Build-Task-Dependency
While it is optional to have this because you can do gradle shadowJar, it is recommended to add the following declaration so your gradle build will automatically shade alumina.
tasks {
build {
dependsOn(shadowJar)
}
}
ShadowJar Task
This is the bread & butter of the shading process, and this declaration is required to shade alumina in your project.
def group = 'com.myplugin.plugin' // Not required
def id = 'MyAmazingPlugin' // Not required
shadowJar {
archiveBaseName.set("${id}")
archiveClassifier.set("")
archiveVersion.set("")
relocate("games.negative.alumina", "${group}.libs.alumina")
}
Adding AluminaPlugin
The AluminaPlugin class, which extends JavaPlugin, is a required class for alumina to function, as the library does some logic behind the scenes when the plugin starts.
When being used, the AluminaPlugin class has three abstract methods that are required to be implemented, which is , , and .