Gracefully fail on older spigot builds due to outdated netty (#4355)

* Test for outdated netty to avoid https://github.com/GeyserMC/Geyser/issues/3814

* capitalization

* bad spigot, go paper
This commit is contained in:
chris 2023-12-20 16:35:48 +01:00 committed by GitHub
parent af83e9269d
commit f3e56d282e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,6 +135,17 @@ public class GeyserSpigotPlugin extends JavaPlugin implements GeyserBootstrap {
}
}
try {
Class.forName("io.netty.util.internal.ObjectPool.ObjectCreator");
} catch (ClassNotFoundException e) {
getLogger().severe("*********************************************");
getLogger().severe("");
getLogger().severe("This version of Spigot is using an outdated version of netty. Please use Paper instead!");
getLogger().severe("");
getLogger().severe("*********************************************");
return;
}
// This is manually done instead of using Bukkit methods to save the config because otherwise comments get removed
try {
if (!getDataFolder().exists()) {