Skip to content
/ RedLib Public

A powerful library for Spigot plugin development with a wide range of tools to make your life easier

License

Notifications You must be signed in to change notification settings

boxbeam/RedLib

Repository files navigation

RedLib

RedLib is a Spigot plugin development library, designed to make your life easier and soothe the pain points of plugin development. Below, find instructions for the various components of RedLib.

Support Discord: https://discord.gg/agu5xGy2YZ

Docs: https://redempt.dev/javadoc/com/github/Redempt/RedLib/index.html

Installation for Development

RedLib is a standalone plugin, but can also be used as a shaded dependency if you do not want to distribute RedLib directly. To use it as a plugin dependency, you must add it as a dependency in your plugin.yml:

depend: [RedLib]

To get the jar, either download it from the releases tab either here on GitHub or on Spigot, or build it locally.

Gradle

repositories {
        maven { url = 'https://redempt.dev' }
}
dependencies {
        compileOnly 'com.github.Redempt:RedLib:Tag'
}

Replace Tag with a release tag for RedLib. You can see the latest version here.

To shade RedLib, change the dependency from compileOnly to implementation, and install the gradle shadow plugin.

If you are having a problem while building, such as plugin.yml is duplicate, try setting duplicatesStrategy to DuplicatesStrategy.EXCLUDE.

tasks {
        processResources {
                duplicatesStrategy = DuplicatesStrategy.EXCLUDE
        }
}

Maven:

<repository>
        <id>redempt.dev</id>
        <url>https://redempt.dev</url>
</repository>
<dependency>
        <groupId>com.github.Redempt</groupId>
        <artifactId>RedLib</artifactId>
        <version>Tag</version>
        <scope>provided</scope>
</dependency>

Replace Tag with a release tag for RedLib. You can see the latest version here.

To shade RedLib, change the scope from provided to compile.

Build locally:

For Windows, use Git Bash. For Linux or OSX, just ensure you have Git installed.Navigate to the directory where you want to clone the repository, and run:

git clone https://github.com/Redempt/RedLib
cd RedLib
./gradlew jar

After running these commands, the jar will be at build/libs/RedLib.jar. You may also need to add the jar to your classpath. After that, you should be good to go!

Usage

For info on how to use RedLib, please see the wiki.