📑alumina

A powerful and modern plugin library to streamline the process of developing Minecraft plugins!

This wiki is currently in development and may not have all up-to-date documentation.

Useful Resources

JavaDocs: https://jd.alumina.dev/

Adding alumina

Maven

Repository

<repository>
    <id>Negative Games</id>
    <url>https://repo.negative.games/repository/maven-releases/</url>
</repository>

Dependency

<dependency>
    <groupId>games.negative.alumina</groupId>
    <artifactId>alumina</artifactId>
    <version>VERSION</version>
    <scope>compile</scope>
</dependency>

Shading

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.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <version>3.5.0</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <createDependencyReducedPom>false</createDependencyReducedPom>
                <relocations>
                    <relocation>
                        <pattern>games.negative.alumina</pattern>
                        <shadedPattern>[YOUR NAMESPACE].alumina</shadedPattern>
                    </relocation>
                </relocations>
            </configuration>
        </execution>
    </executions>
</plugin>
Gradle

Repository

maven { url 'https://repo.negative.games/repository/maven-releases/' }

Dependency

implementation("games.negative.alumina:alumina:VERSION")

Shading

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 .

Example Class
public class ExamplePlugin extends AluminaPlugin {
    
    @Override
    public void load() {
        
    }

    @Override
    public void enable() {
        // Register listeners, commands, etc.
    }

    @Override
    public void disable() {

    }
    
}

Last updated