mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Moved "isFolia" to main module to avoid error on java version under 1.21
Also moved folia scheduler to another nms module allowing support of folia 1.20.4
This commit is contained in:
parent
694ece5443
commit
3bdb0ce536
2 changed files with 18 additions and 20 deletions
|
|
@ -25,7 +25,7 @@ object DependencyManager {
|
|||
val pluginManager = Bukkit.getPluginManager()
|
||||
|
||||
// Bukkit or Paper scheduler ?
|
||||
isFolia = FoliaScheduler.isFolia()
|
||||
isFolia = testIsFolia()
|
||||
scheduler = if(isFolia) {
|
||||
CustomAnvil.instance.logger.info("Folia detected... Custom Anvil Folia support is experimental. issues are more likely to happens.")
|
||||
|
||||
|
|
@ -92,4 +92,14 @@ object DependencyManager {
|
|||
return bypass
|
||||
}
|
||||
|
||||
|
||||
private fun testIsFolia(): Boolean {
|
||||
try {
|
||||
Class.forName("io.papermc.paper.threadedregions.RegionizedServer")
|
||||
return true
|
||||
} catch (e: ClassNotFoundException) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue