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:
TDSTOS
2026-04-12 12:56:14 +02:00
parent c261a3a07c
commit b95e05da24

View File

@@ -57,6 +57,17 @@ class GameManager(
}, 20L, 20L ) }, 20L, 20L )
recraftManager.startRunnable() 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 private var lobbyIdleCount: Int = 0