Is a library that monitors whether there is an update for the project using the modrinth API.
- Java 17 or higher
- Add the repository to your project.
Maven:
<repository>
<id>felipe-releases</id>
<name>Felipe Ros</name>
<url>https://repo.felipe.fun/releases</url>
</repository>
Gradle (Groovy):
maven {
url "https://repo.felipe.fun/releases"
}
Gradle (Kotlin):
maven {
url = uri("https://repo.felipe.fun/releases")
}
- Add the dependency.
Maven:
<dependency>
<groupId>fun.felipe</groupId>
<artifactId>Updater</artifactId>
<version>1.0.1-RELEASE</version>
</dependency>
Gradle (Groovy):
implementation "fun.felipe:Updater:1.0.1-RELEASE"
Gradle (Kotlin):
implementation("fun.felipe:Updater:1.0.1-RELEASE")
//In your Main class.
@Override
public void onEnable() {
if (!Updater.verification("project modrinth slug", this.plgetPluginMeta().getVersion()) {
this.getLogger().warning("There is a new version available!");
}
}