From 047f54094adbbfab437802585baf44401544b826 Mon Sep 17 00:00:00 2001 From: LabodiDavid Date: Sun, 6 Apr 2025 15:00:26 +0200 Subject: [PATCH] Allow plugin run with newer untested server versions --- src/main/java/hu/ditservices/STPlugin.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/hu/ditservices/STPlugin.java b/src/main/java/hu/ditservices/STPlugin.java index 4d7413b..76ac7ab 100644 --- a/src/main/java/hu/ditservices/STPlugin.java +++ b/src/main/java/hu/ditservices/STPlugin.java @@ -108,10 +108,11 @@ public final class STPlugin extends JavaPlugin implements CommandExecutor, Liste private boolean initPlugin() { try { this.ServerStartTime = ManagementFactory.getRuntimeMXBean().getStartTime(); - if (Version.ServerVersion.isCurrentLower(Version.ServerVersion.v1_12_R1) || - Version.ServerVersion.isCurrentHigher(Version.ServerVersion.v1_21_5_R1)) - { - throw new Exception("The server version is not supported! Update to a version between 1.12 - 1.21.5 to run this plugin."); + if (Version.ServerVersion.isCurrentLower(Version.ServerVersion.v1_12_R1)) { + throw new Exception("The server version is not supported! Update to to atleast 1.12 version to use this plugin!"); + } + if (Version.ServerVersion.isCurrentHigher(Version.ServerVersion.v1_21_5_R1)) { + this.log.warning(ChatColor.stripColor(this.getPrefix()) + "You are running a server version which is not tested with this plugin, errors can be occur!"); } if (this.reload()) {