Fixed issue where the BukkitVersionHelperSpigot116 would be incorrectly loaded for newer versions.

This commit is contained in:
Thomas Janssen 2020-11-05 09:52:33 +01:00
parent 426346f48a
commit c7fa125bdc

View File

@ -37,7 +37,7 @@ public class Helper {
Log.info("Loading Glowstone support");
BukkitVersionHelper.helper = new BukkitVersionHelperGlowstone();
}
else if (v.contains("(MC: 1.16)") || v.contains("(MC: 1.16.1")) {
else if (v.contains("(MC: 1.16.1")) {
BukkitVersionHelper.helper = new BukkitVersionHelperSpigot116();
}
else if (v.contains("(MC: 1.16.2)")) {
@ -49,6 +49,10 @@ public class Helper {
else if (v.contains("(MC: 1.16.")) {
BukkitVersionHelper.helper = new BukkitVersionHelperSpigot116_4();
}
// Loading last to prevent the 1.16 contains to match all newer versions and load older helper incorrectly.
else if (v.contains("(MC: 1.16")) {
BukkitVersionHelper.helper = new BukkitVersionHelperSpigot116();
}
else if (v.contains("(MC: 1.15)") || v.contains("(MC: 1.15.")) {
BukkitVersionHelper.helper = new BukkitVersionHelperSpigot115();
}