Add Folia scheduler adapter with folia check support;
(cherry picked from commit 7dd04ccc1b
)
This commit is contained in:
parent
aa254c80e0
commit
4ad4abb806
|
@ -0,0 +1,19 @@
|
|||
package com.sk89q.worldguard.bukkit.scheduler;
|
||||
|
||||
public class FoliaSchedulerAdapter {
|
||||
|
||||
private static final boolean SUPPORTED = checkSupport();
|
||||
|
||||
public static boolean isSupported() {
|
||||
return SUPPORTED;
|
||||
}
|
||||
|
||||
private static boolean checkSupport() {
|
||||
try {
|
||||
Class.forName("io.papermc.paper.threadedregions.RegionizedServer");
|
||||
return true;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue