Skip to content

Commit

Permalink
Added bStats integration
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrmaciejbednarski committed Feb 8, 2025
1 parent bb73fe9 commit c66871f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
15 changes: 14 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
plugins {
id 'java'
id("com.gradleup.shadow") version "8.3.5"
}

group = 'com.piotrbednarski'
version = '1.1.5'
version = '1.1.6'

repositories {
mavenCentral()
Expand All @@ -25,6 +26,18 @@ dependencies {
compileOnly("org.spigotmc:spigot-api:1.20.1-R0.1-SNAPSHOT")
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.3.0")
implementation("com.google.code.gson:gson:2.12.1")
implementation("org.bstats:bstats-bukkit:3.0.0")
}

tasks {
shadowJar {
archiveClassifier.set("")
relocate("org.bstats", "com.grinderwolf.swm.internal.bstats")
}

assemble {
dependsOn(shadowJar)
}
}

def targetJavaVersion = 17
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.piotrbednarski.logicgatesplugin.util.GatesConfigManager;
import com.piotrbednarski.logicgatesplugin.util.UpdateChecker;
import com.sk89q.worldedit.WorldEdit;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
Expand Down Expand Up @@ -109,6 +110,10 @@ public void onEnable() {
)
);

// Initialize bStats
int BSTATS_ID = 24700;
Metrics metrics = new Metrics(this, BSTATS_ID);

// Automatic update check on startup
try {
if (updateChecker.shouldCheckAutomatically()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: LogicGates
version: '1.1.5'
version: '1.1.6'
main: com.piotrbednarski.logicgatesplugin.LogicGatesPlugin
api-version: '1.16'
softdepend: [ Multiverse-Core, WorldEdit, AsyncWorldEdit, FastAsyncWorldEdit ]
Expand Down

0 comments on commit c66871f

Please sign in to comment.