Updated ClassTokenReplacer

This commit is contained in:
RaphiMC 2024-06-19 12:39:35 +02:00
parent 9445d63773
commit 059139ac22
No known key found for this signature in database
GPG key ID: 0F6BB0657A03AC94
2 changed files with 2 additions and 2 deletions

View file

@ -3,7 +3,7 @@ plugins {
id "application"
id "maven-publish"
id "idea"
id "net.raphimc.class-token-replacer" version "1.0.1"
id "net.raphimc.class-token-replacer" version "1.1.0"
id "xyz.wagyourtail.jvmdowngrader" version "0.7.2"
}

View file

@ -116,7 +116,7 @@ public class PluginManager {
if (!yaml.containsKey("version")) throw new IllegalStateException("Plugin '" + file.getName() + "' does not have a version attribute in the viaproxy.yml");
if (!yaml.containsKey("main")) throw new IllegalStateException("Plugin '" + file.getName() + "' does not have a main attribute in the viaproxy.yml");
final Semver minVersion = new Semver(yaml.getOrDefault("min-version", "0.0.0").toString());
if (!ViaProxy.VERSION.equals("${version}") && minVersion.isGreaterThan(ViaProxy.VERSION.replace("-SNAPSHOT", ""))) {
if (!ViaProxy.VERSION.startsWith("${") && minVersion.isGreaterThan(ViaProxy.VERSION.replace("-SNAPSHOT", ""))) {
throw new IllegalStateException("Plugin '" + file.getName() + "' requires a newer version of ViaProxy (v" + minVersion + ")");
}