Skip to content

Commit

Permalink
feat: bstats metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
rexlManu committed Jun 18, 2023
1 parent 2797028 commit dfcdefc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ dependencies {

// Plugin dependencies
compileOnly(libs.miniplaceholders)

implementation(libs.bstats)
}

tasks {
Expand All @@ -47,6 +49,7 @@ tasks {
}
shadowJar {
archiveClassifier.set("")
relocate("org.bstats", "de.rexlmanu.fairychat.dependencies.bstats")
from(file("LICENSE"))

dependencies {
Expand Down
3 changes: 2 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ miniplaceholders = { module = "io.github.miniplaceholders:miniplaceholders-api",
commandframework = { module = "cloud.commandframework:cloud-paper", version = "1.8.3" }
configlib = { module = "com.github.Exlll.ConfigLib:configlib-paper", version = "v4.2.0" }
guice = { module = "com.google.inject:guice", version = "7.0.0" }
luckperms = { module = "net.luckperms:api", version = "5.4" }
luckperms = { module = "net.luckperms:api", version = "5.4" }
bstats = { module = "org.bstats:bstats-bukkit", version = "3.0.2" }
2 changes: 2 additions & 0 deletions src/main/java/de/rexlmanu/fairychat/plugin/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ private Constants() {

public static final String MESSAGING_CHANNEL = "fairychat:messaging";
public static final String BROADCAST_CHANNEL = "fairychat:broadcast";

public static final int BSTATS_ID = 18786;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import de.rexlmanu.fairychat.plugin.module.PermissionModule;
import de.rexlmanu.fairychat.plugin.module.PluginModule;
import de.rexlmanu.fairychat.plugin.redis.RedisConnector;
import org.bstats.bukkit.Metrics;
import org.bukkit.plugin.java.JavaPlugin;

public class FairyChatPlugin extends JavaPlugin {
Expand All @@ -34,6 +35,8 @@ public void onEnable() {
.registerEvents(this.injector.getInstance(ChatListener.class), this);

this.registerCommands();

new Metrics(this, Constants.BSTATS_ID);
}

@Override
Expand Down

0 comments on commit dfcdefc

Please sign in to comment.