From b7666525b0f4120f5e0bc016394413861d122af4 Mon Sep 17 00:00:00 2001 From: Trivernis Date: Wed, 18 Sep 2019 20:50:13 +0200 Subject: [PATCH] Added bStats --- build.gradle | 13 +++++++++---- .../kotlin/net/trivernis/chunkmaster/Chunkmaster.kt | 4 ++++ src/main/resources/plugin.yml | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 9930870..581da97 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ idea { } group "net.trivernis" -version "0.10-beta" +version "0.11-beta" sourceCompatibility = 1.8 @@ -31,9 +31,6 @@ repositories { maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots" } - maven { - url 'https://papermc.io/repo/repository/maven-public/' - } maven { url 'https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc' } @@ -41,6 +38,10 @@ repositories { name 'papermc' url 'https://papermc.io/repo/repository/maven-public/' } + maven { + name 'CodeMc' + url 'https://repo.codemc.org/repository/maven-public' + } } dependencies { @@ -50,11 +51,15 @@ dependencies { compileOnly "org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT" compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.28.0' compile "io.papermc:paperlib:1.0.2" + compile "org.bstats:bstats-bukkit:1.5" } apply plugin: "com.github.johnrengelman.shadow" +apply plugin: 'java' + shadowJar { relocate 'io.papermc.lib', 'net.trivernis.chunkmaster.paperlib' + relocate 'org.bstats', 'net.trivernis.chunkmaster.bstats' } jar { diff --git a/src/main/kotlin/net/trivernis/chunkmaster/Chunkmaster.kt b/src/main/kotlin/net/trivernis/chunkmaster/Chunkmaster.kt index 117bb10..6d5ab8b 100644 --- a/src/main/kotlin/net/trivernis/chunkmaster/Chunkmaster.kt +++ b/src/main/kotlin/net/trivernis/chunkmaster/Chunkmaster.kt @@ -4,6 +4,7 @@ import io.papermc.lib.PaperLib import net.trivernis.chunkmaster.commands.* import net.trivernis.chunkmaster.lib.generation.GenerationManager import net.trivernis.chunkmaster.lib.SqlUpdateManager +import org.bstats.bukkit.Metrics import org.bukkit.plugin.java.JavaPlugin import org.bukkit.scheduler.BukkitTask import java.lang.Exception @@ -24,6 +25,9 @@ class Chunkmaster: JavaPlugin() { override fun onEnable() { PaperLib.suggestPaper(this) configure() + + val metrics = Metrics(this) + initDatabase() generationManager = GenerationManager(this, server) generationManager.init() diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 096b64a..350e596 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' +version: '0.11-beta' description: Chunk commands plugin. author: Trivernis website: trivernis.net