Update VersionUtil.java

This commit is contained in:
CrazyCloudCraft 2024-03-10 18:02:21 +01:00 committed by GitHub
parent a533f0ca54
commit 89e16aab70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,42 +19,24 @@ public class VersionUtil {
if (version == 0) {
// Detect version
String v = Bukkit.getVersion();
if (v.contains("1.20"))
version = 20;
else if (v.contains("1.19"))
version = 19;
else if (v.contains("1.18"))
version = 18;
else if (v.contains("1.17"))
version = 17;
else if (v.contains("1.16"))
version = 16;
else if (v.contains("1.15"))
version = 15;
else if (v.contains("1.14"))
version = 14;
else if (v.contains("1.13"))
version = 13;
else if (v.contains("1.12"))
version = 12;
else if (v.contains("1.11"))
version = 11;
else if (v.contains("1.10"))
version = 10;
else if (v.contains("1.9"))
version = 9;
else if (v.contains("1.8"))
version = 8;
else if (v.contains("1.7"))
version = 7;
else if (v.contains("1.6"))
version = 6;
else if (v.contains("1.5"))
version = 5;
else if (v.contains("1.4"))
version = 4;
else if (v.contains("1.3"))
version = 3;
if (v.contains("1.20")) version = 20;
else if (v.contains("1.19")) version = 19;
else if (v.contains("1.18")) version = 18;
else if (v.contains("1.17")) version = 17;
else if (v.contains("1.16")) version = 16;
else if (v.contains("1.15")) version = 15;
else if (v.contains("1.14")) version = 14;
else if (v.contains("1.13")) version = 13;
else if (v.contains("1.12")) version = 12;
else if (v.contains("1.11")) version = 11;
else if (v.contains("1.10")) version = 10;
else if (v.contains("1.9")) version = 9;
else if (v.contains("1.8")) version = 8;
else if (v.contains("1.7")) version = 7;
else if (v.contains("1.6")) version = 6;
else if (v.contains("1.5")) version = 5;
else if (v.contains("1.4")) version = 4;
else if (v.contains("1.3")) version = 3;
}
if (version == 0) {
System.err.println("[WorldSystem] Unknown version: " + Bukkit.getVersion());