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
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.
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
}
}
<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
.
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!
For info on how to use RedLib, please see the wiki.