From 059139ac22ae0a680f63a50601ba91ad7c7892aa Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Wed, 19 Jun 2024 12:39:35 +0200 Subject: [PATCH] Updated ClassTokenReplacer --- build.gradle | 2 +- src/main/java/net/raphimc/viaproxy/plugins/PluginManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 5b517ad..80b9fd3 100644 --- a/build.gradle +++ b/build.gradle @@ -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" } diff --git a/src/main/java/net/raphimc/viaproxy/plugins/PluginManager.java b/src/main/java/net/raphimc/viaproxy/plugins/PluginManager.java index 9d03118..4c91ab8 100644 --- a/src/main/java/net/raphimc/viaproxy/plugins/PluginManager.java +++ b/src/main/java/net/raphimc/viaproxy/plugins/PluginManager.java @@ -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 + ")"); }