|
|
@ -9,6 +9,8 @@ import org.bstats.bukkit.Metrics
|
|
|
|
import org.bukkit.plugin.java.JavaPlugin
|
|
|
|
import org.bukkit.plugin.java.JavaPlugin
|
|
|
|
import org.bukkit.scheduler.BukkitTask
|
|
|
|
import org.bukkit.scheduler.BukkitTask
|
|
|
|
import org.dynmap.DynmapAPI
|
|
|
|
import org.dynmap.DynmapAPI
|
|
|
|
|
|
|
|
import java.lang.IllegalStateException
|
|
|
|
|
|
|
|
import java.lang.NullPointerException
|
|
|
|
|
|
|
|
|
|
|
|
class Chunkmaster : JavaPlugin() {
|
|
|
|
class Chunkmaster : JavaPlugin() {
|
|
|
|
lateinit var sqliteManager: SqliteManager
|
|
|
|
lateinit var sqliteManager: SqliteManager
|
|
|
@ -103,12 +105,16 @@ class Chunkmaster : JavaPlugin() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private fun getDynmap(): DynmapAPI? {
|
|
|
|
private fun getDynmap(): DynmapAPI? {
|
|
|
|
|
|
|
|
return try {
|
|
|
|
val dynmap = server.pluginManager.getPlugin("dynmap")
|
|
|
|
val dynmap = server.pluginManager.getPlugin("dynmap")
|
|
|
|
return if (dynmap != null && dynmap is DynmapAPI) {
|
|
|
|
if (dynmap != null && dynmap is DynmapAPI) {
|
|
|
|
logger.info(langManager.getLocalized("PLUGIN_DETECTED", "dynmap", dynmap.dynmapVersion))
|
|
|
|
logger.info(langManager.getLocalized("PLUGIN_DETECTED", "dynmap", dynmap.dynmapVersion))
|
|
|
|
dynmap
|
|
|
|
dynmap
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
null
|
|
|
|
null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (e: IllegalStateException) {
|
|
|
|
|
|
|
|
null
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|