mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-24 16:14:26 +08:00
Bump bstatsVersion from 1.8 to 2.1.0 in /Plan (#1720)
* Bump bstatsVersion from 1.8 to 2.1.0 in /Plan Bumps `bstatsVersion` from 1.8 to 2.1.0. Updates `bstats-bukkit` from 1.8 to 2.1.0 - [Release notes](https://github.com/Bastian/bStats-Metrics/releases) - [Commits](https://github.com/Bastian/bStats-Metrics/commits/v2.1.0) Updates `bstats-sponge` from 1.8 to 2.1.0 - [Release notes](https://github.com/Bastian/bStats-Metrics/releases) - [Commits](https://github.com/Bastian/bStats-Metrics/commits/v2.1.0) Updates `bstats-bungeecord` from 1.8 to 2.1.0 - [Release notes](https://github.com/Bastian/bStats-Metrics/releases) - [Commits](https://github.com/Bastian/bStats-Metrics/commits/v2.1.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Updated metrics imports * Relocate Sponge bstats metrics Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Risto Lahtela <24460436+Rsl1122@users.noreply.github.com>
This commit is contained in:
parent
4871d524f7
commit
1e0f875897
@ -90,7 +90,7 @@ subprojects {
|
||||
ext.geoIpVersion = "2.15.0"
|
||||
ext.gsonVersion = "2.8.6"
|
||||
ext.guavaVersion = "28.0-jre"
|
||||
ext.bstatsVersion = "1.8"
|
||||
ext.bstatsVersion = "2.1.0"
|
||||
ext.placeholderapiVersion = "2.10.9"
|
||||
ext.nkPlaceholderapiVersion = "1.3-SNAPSHOT"
|
||||
|
||||
|
@ -18,6 +18,7 @@ package com.djrapitops.plan;
|
||||
|
||||
import com.djrapitops.plugin.api.Check;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.SimplePie;
|
||||
|
||||
public class BStatsBukkit {
|
||||
|
||||
@ -47,6 +48,6 @@ public class BStatsBukkit {
|
||||
}
|
||||
|
||||
protected void addStringSettingPie(String id, String setting) {
|
||||
metrics.addCustomChart(new Metrics.SimplePie(id, () -> setting));
|
||||
metrics.addCustomChart(new SimplePie(id, () -> setting));
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ package com.djrapitops.plan;
|
||||
import com.djrapitops.plan.storage.database.Database;
|
||||
import com.djrapitops.plan.storage.database.queries.objects.ServerQueries;
|
||||
import org.bstats.bungeecord.Metrics;
|
||||
import org.bstats.charts.SimplePie;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@ -49,6 +50,6 @@ public class BStatsBungee {
|
||||
}
|
||||
|
||||
protected void addStringSettingPie(String id, Supplier<String> setting) {
|
||||
metrics.addCustomChart(new Metrics.SimplePie(id, setting::get));
|
||||
metrics.addCustomChart(new SimplePie(id, setting::get));
|
||||
}
|
||||
}
|
||||
|
@ -24,5 +24,7 @@ dependencies {
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
relocate 'org.bstats', 'com.djrapitops.plan.utilities.metrics'
|
||||
|
||||
configurations = [project.configurations.compile]
|
||||
}
|
@ -17,16 +17,17 @@
|
||||
package com.djrapitops.plan;
|
||||
|
||||
import com.djrapitops.plan.storage.database.Database;
|
||||
import org.bstats.sponge.Metrics2;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bstats.sponge.Metrics;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class BStatsSponge {
|
||||
|
||||
private final Metrics2 metrics;
|
||||
private final Metrics metrics;
|
||||
private final Database database;
|
||||
|
||||
public BStatsSponge(Metrics2 metrics, Database database) {
|
||||
public BStatsSponge(Metrics metrics, Database database) {
|
||||
this.metrics = metrics;
|
||||
this.database = database;
|
||||
}
|
||||
@ -46,6 +47,6 @@ public class BStatsSponge {
|
||||
}
|
||||
|
||||
protected void addStringSettingPie(String id, Serializable setting) {
|
||||
metrics.addCustomChart(new Metrics2.SimplePie(id, setting::toString));
|
||||
metrics.addCustomChart(new SimplePie(id, setting::toString));
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import com.djrapitops.plan.settings.theme.PlanColorScheme;
|
||||
import com.djrapitops.plugin.SpongePlugin;
|
||||
import com.djrapitops.plugin.command.ColorScheme;
|
||||
import com.djrapitops.plugin.logging.L;
|
||||
import org.bstats.sponge.Metrics2;
|
||||
import org.bstats.sponge.Metrics;
|
||||
import org.slf4j.Logger;
|
||||
import org.spongepowered.api.Game;
|
||||
import org.spongepowered.api.Sponge;
|
||||
@ -63,7 +63,7 @@ import java.util.Optional;
|
||||
public class PlanSponge extends SpongePlugin implements PlanPlugin {
|
||||
|
||||
@com.google.inject.Inject
|
||||
private Metrics2.Factory metrics;
|
||||
private Metrics.Factory metrics;
|
||||
|
||||
@com.google.inject.Inject
|
||||
private Logger slf4jLogger;
|
||||
|
Loading…
Reference in New Issue
Block a user