diff --git a/src/main/kotlin/net/trivernis/chunkmaster/ChunkmasterEvents.kt b/src/main/kotlin/net/trivernis/chunkmaster/ChunkmasterEvents.kt index 9cae7f2..b93c651 100644 --- a/src/main/kotlin/net/trivernis/chunkmaster/ChunkmasterEvents.kt +++ b/src/main/kotlin/net/trivernis/chunkmaster/ChunkmasterEvents.kt @@ -6,17 +6,19 @@ import org.bukkit.event.Listener import org.bukkit.event.player.PlayerJoinEvent import org.bukkit.event.player.PlayerQuitEvent -class ChunkmasterEvents(private val chunkmaster: Chunkmaster, private val server: Server): Listener { +class ChunkmasterEvents(private val chunkmaster: Chunkmaster, private val server: Server) : Listener { private val pauseOnJoin = chunkmaster.config.getBoolean("generation.pause-on-join") /** * Autostart generation tasks */ - @EventHandler fun onPlayerQuit(event: PlayerQuitEvent) { + @EventHandler + fun onPlayerQuit(event: PlayerQuitEvent) { if (pauseOnJoin) { if (server.onlinePlayers.size == 1 && server.onlinePlayers.contains(event.player) || - server.onlinePlayers.isEmpty()) { + server.onlinePlayers.isEmpty() + ) { if (!chunkmaster.generationManager.paused) { chunkmaster.generationManager.startAll() chunkmaster.logger.info("Server is empty. Starting chunk generation tasks.") @@ -28,7 +30,8 @@ class ChunkmasterEvents(private val chunkmaster: Chunkmaster, private val server /** * Autostop generation tasks */ - @EventHandler fun onPlayerJoin(event: PlayerJoinEvent) { + @EventHandler + fun onPlayerJoin(event: PlayerJoinEvent) { if (pauseOnJoin) { if (server.onlinePlayers.size == 1 || server.onlinePlayers.isEmpty()) { chunkmaster.generationManager.stopAll() diff --git a/src/main/kotlin/net/trivernis/chunkmaster/lib/SqlUpdateManager.kt b/src/main/kotlin/net/trivernis/chunkmaster/lib/SqlUpdateManager.kt index 5c4fdf2..5da91d6 100644 --- a/src/main/kotlin/net/trivernis/chunkmaster/lib/SqlUpdateManager.kt +++ b/src/main/kotlin/net/trivernis/chunkmaster/lib/SqlUpdateManager.kt @@ -62,7 +62,7 @@ class SqlUpdateManager(private val connnection: Connection, private val chunkmas stmt.execute() stmt.close() } catch (err: Exception) { - chunkmaster.logger.severe("Error creating table $table."); + chunkmaster.logger.severe("Error creating table $table.") } } for (table in needUpdate) { diff --git a/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/TaskEntry.kt b/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/TaskEntry.kt index f0de0dc..552461b 100644 --- a/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/TaskEntry.kt +++ b/src/main/kotlin/net/trivernis/chunkmaster/lib/generation/TaskEntry.kt @@ -2,5 +2,4 @@ package net.trivernis.chunkmaster.lib.generation import org.bukkit.scheduler.BukkitTask -data class TaskEntry(val id: Int, val task: BukkitTask, val generationTask: GenerationTask) { -} \ No newline at end of file +data class TaskEntry(val id: Int, val task: BukkitTask, val generationTask: GenerationTask) \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 8708e9f..096b64a 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ main: net.trivernis.chunkmaster.Chunkmaster name: Chunkmaster -version: '0.10-beta-SNAPSHOT' +version: '0.10-beta' description: Chunk commands plugin. author: Trivernis website: trivernis.net