Code cleanup, Version correction

- changed version from 0.10-beta-SNAPSHOT to 0.10-beta
pull/1/head
Trivernis 5 years ago
parent 5a5fe74d9c
commit 638ae07fe5

@ -13,10 +13,12 @@ class ChunkmasterEvents(private val chunkmaster: Chunkmaster, private val server
/**
* 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()

@ -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) {

@ -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) {
}
data class TaskEntry(val id: Int, val task: BukkitTask, val generationTask: GenerationTask)

@ -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

Loading…
Cancel
Save