Fix start errors
This commit is contained in:
@@ -12,7 +12,7 @@ class WorldManager(
|
||||
private val plugin: SpeedHG
|
||||
) {
|
||||
|
||||
private lateinit var worldName: String
|
||||
private var worldName = "world"
|
||||
private lateinit var world: World
|
||||
|
||||
fun highestLocationWithRadius(
|
||||
@@ -113,21 +113,21 @@ class WorldManager(
|
||||
|
||||
// CHUNKY >>
|
||||
|
||||
plugin.logger.info("Setting up world... [Stage [3]: CHUNKY]")
|
||||
val chunky = Bukkit.getServicesManager().load( ChunkyAPI::class.java )
|
||||
|
||||
if ( chunky == null || chunky.version() != 0 )
|
||||
{
|
||||
plugin.isReady = true
|
||||
return
|
||||
}
|
||||
|
||||
val radius = world.worldBorder.size / 2
|
||||
|
||||
chunky.startTask( worldName, "square", 0.0, 0.0, radius, radius, "concentric" )
|
||||
chunky.onGenerationComplete { plugin.isReady = true }
|
||||
|
||||
plugin.server.dispatchCommand( Bukkit.getConsoleSender(), "chunky silent" )
|
||||
// plugin.logger.info("Setting up world... [Stage [3]: CHUNKY]")
|
||||
// val chunky = Bukkit.getServicesManager().load( ChunkyAPI::class.java )
|
||||
//
|
||||
// if ( chunky == null || chunky.version() != 0 )
|
||||
// {
|
||||
// plugin.isReady = true
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// val radius = world.worldBorder.size / 2
|
||||
//
|
||||
// chunky.startTask( worldName, "square", 0.0, 0.0, radius, radius, "concentric" )
|
||||
// chunky.onGenerationComplete { plugin.isReady = true }
|
||||
//
|
||||
// plugin.server.dispatchCommand( Bukkit.getConsoleSender(), "chunky silent" )
|
||||
|
||||
// FINISH >>
|
||||
|
||||
@@ -150,7 +150,9 @@ class WorldManager(
|
||||
fun getWorld(): World?
|
||||
{
|
||||
return if ( !::world.isInitialized )
|
||||
setWorld( plugin.pluginConfig.data.world.name )
|
||||
try {
|
||||
setWorld( plugin.pluginConfig.data.world.name )
|
||||
} catch ( _: Exception ) { null }
|
||||
else this.world
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user