Initialize world border on startup
Add a delayed task (runTaskLater 10L) that retrieves the "world" and configures its WorldBorder: center at (0,0,0), size set to startBorder, damageBuffer set to 0.0 and damageAmount set to 1.0. Ensures the world border is initialized shortly after plugin startup/world load.
This commit is contained in:
@@ -57,6 +57,17 @@ class GameManager(
|
||||
}, 20L, 20L )
|
||||
|
||||
recraftManager.startRunnable()
|
||||
|
||||
Bukkit.getScheduler().runTaskLater( plugin, { ->
|
||||
val world = Bukkit.getWorld( "world" )
|
||||
|
||||
world?.worldBorder?.apply {
|
||||
center = Location( world, 0.0, 0.0, 0.0 )
|
||||
size = startBorder
|
||||
damageBuffer = 0.0
|
||||
damageAmount = 1.0
|
||||
}
|
||||
}, 10L )
|
||||
}
|
||||
|
||||
private var lobbyIdleCount: Int = 0
|
||||
|
||||
Reference in New Issue
Block a user