Fixed async chunk loading in 1.16

This commit is contained in:
Fabrizio La Rosa 2020-08-07 00:24:00 +02:00
parent b7a09b76a2
commit f8830771f6

View File

@ -121,8 +121,12 @@ public class SkyBlock extends SongodaPlugin {
if(paper = ServerProject.isServer(ServerProject.PAPER)){ if(paper = ServerProject.isServer(ServerProject.PAPER)){
try { try {
Bukkit.spigot().getClass().getMethod("getPaperConfig"); Bukkit.spigot().getClass().getMethod("getPaperConfig");
paperAsync = ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13) && if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_16)) {
Bukkit.spigot().getPaperConfig().getBoolean("settings.async-chunks.enable", false); paperAsync = true;
} else {
paperAsync = ServerVersion.isServerVersionAtLeast(ServerVersion.V1_13) &&
Bukkit.spigot().getPaperConfig().getBoolean("settings.async-chunks.enable", false);
}
} catch (NoSuchMethodException ignored) { } catch (NoSuchMethodException ignored) {
paperAsync = false; paperAsync = false;
} }