Fix for old Paper versions

This commit is contained in:
Fabrizio La Rosa 2020-07-03 15:21:11 +02:00
parent e332b8aea9
commit 2b41236439

View File

@ -118,7 +118,12 @@ public class SkyBlock extends SongodaPlugin {
}
if(paper = ServerProject.isServer(ServerProject.PAPER)){
paperAsync = Bukkit.spigot().getPaperConfig().getBoolean("settings.async-chunks.enable", false);
try {
Bukkit.spigot().getClass().getMethod("getPaperConfig");
paperAsync = Bukkit.spigot().getPaperConfig().getBoolean("settings.async-chunks.enable", false);
} catch (NoSuchMethodException ignored) {
paperAsync = false;
}
this.getLogger().info("Enabling Paper hooks");
}