ayaports/user/papermc-plugin-vault/868_update-bstats.patch
Antoine Martin 56a29dc807
All checks were successful
/ lint (pull_request) Successful in 32s
/ deploy-x86_64 (pull_request) Successful in 40s
/ build-x86_64 (pull_request) Successful in 1m9s
/ deploy-aarch64 (pull_request) Successful in 56s
/ build-aarch64 (pull_request) Successful in 2m41s
user/papermc-plugin-vault: new aport
2024-12-24 14:05:52 -05:00

72 lines
2.9 KiB
Diff

From 3f20655f0b1b9c7a0f69eb241c5bedd8e748b5c9 Mon Sep 17 00:00:00 2001
From: Leonardo Di Gianfelice Stornelli
<leonardo.digianfelicestornelli@gmail.com>
Date: Tue, 28 Jun 2022 00:34:40 +0200
Subject: [PATCH] Update bStats (#868)
---
pom.xml | 2 +-
src/net/milkbowl/vault/Vault.java | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index 17c189fd..ccd8cde4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -85,7 +85,7 @@ Vault currently supports the following: Permissions 3, PEX, GroupManager, bPerms
<dependency>
<groupId>org.bstats</groupId>
<artifactId>bstats-bukkit</artifactId>
- <version>1.5</version>
+ <version>3.0.0</version>
</dependency>
<dependency>
<groupId>com.gmail.bleedobsidian.miconomy</groupId>
diff --git a/src/net/milkbowl/vault/Vault.java b/src/net/milkbowl/vault/Vault.java
index 30f6f17f..ef8b5578 100644
--- a/src/net/milkbowl/vault/Vault.java
+++ b/src/net/milkbowl/vault/Vault.java
@@ -78,6 +78,7 @@
import net.milkbowl.vault.permission.plugins.Permission_KPerms;
import org.bstats.bukkit.Metrics;
+import org.bstats.charts.SimplePie;
import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.Command;
@@ -185,7 +186,7 @@ public void run() {
});
// Load up the Plugin metrics
- Metrics metrics = new Metrics(this);
+ Metrics metrics = new Metrics(this, 887);
findCustomData(metrics);
log.info(String.format("Enabled Version %s", getDescription().getVersion()));
@@ -581,7 +582,7 @@ private void findCustomData(Metrics metrics) {
econ = rspEcon.getProvider();
}
final String econName = econ != null ? econ.getName() : "No Economy";
- metrics.addCustomChart(new Metrics.SimplePie("economy", new Callable<String>() {
+ metrics.addCustomChart(new SimplePie("economy", new Callable<String>() {
@Override
public String call() {
return econName;
@@ -590,7 +591,7 @@ public String call() {
// Create our Permission Graph and Add our permission Plotters
final String permName = Bukkit.getServer().getServicesManager().getRegistration(Permission.class).getProvider().getName();
- metrics.addCustomChart(new Metrics.SimplePie("permission", new Callable<String>() {
+ metrics.addCustomChart(new SimplePie("permission", new Callable<String>() {
@Override
public String call() {
return permName;
@@ -604,7 +605,7 @@ public String call() {
chat = rspChat.getProvider();
}
final String chatName = chat != null ? chat.getName() : "No Chat";
- metrics.addCustomChart(new Metrics.SimplePie("chat", new Callable<String>() {
+ metrics.addCustomChart(new SimplePie("chat", new Callable<String>() {
@Override
public String call() {
return chatName;