mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Update bStats to 2.1.0
This commit is contained in:
parent
86e8457574
commit
aaf2fa8807
@ -6,11 +6,6 @@ repositories {
|
|||||||
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
|
||||||
}
|
}
|
||||||
|
|
||||||
maven {
|
|
||||||
name = "CodeMC"
|
|
||||||
url = uri("https://repo.codemc.org/repository/maven-public")
|
|
||||||
}
|
|
||||||
|
|
||||||
maven {
|
maven {
|
||||||
name = "PlaceholderAPI"
|
name = "PlaceholderAPI"
|
||||||
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
||||||
@ -47,7 +42,7 @@ dependencies {
|
|||||||
//
|
//
|
||||||
|
|
||||||
// Metrics
|
// Metrics
|
||||||
implementation("org.bstats:bstats-bukkit:1.8")
|
implementation("org.bstats:bstats-bukkit:2.1.0")
|
||||||
|
|
||||||
// Minecraft
|
// Minecraft
|
||||||
compileOnlyApi("com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT")
|
compileOnlyApi("com.destroystokyo.paper:paper-api:1.16.5-R0.1-SNAPSHOT")
|
||||||
|
@ -123,6 +123,8 @@ import net.kyori.adventure.audience.Audience;
|
|||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||||
import org.bstats.bukkit.Metrics;
|
import org.bstats.bukkit.Metrics;
|
||||||
|
import org.bstats.charts.DrilldownPie;
|
||||||
|
import org.bstats.charts.SimplePie;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Chunk;
|
import org.bukkit.Chunk;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@ -1030,7 +1032,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
}
|
}
|
||||||
this.metricsStarted = true;
|
this.metricsStarted = true;
|
||||||
Metrics metrics = new Metrics(this, BSTATS_ID); // bstats
|
Metrics metrics = new Metrics(this, BSTATS_ID); // bstats
|
||||||
metrics.addCustomChart(new Metrics.DrilldownPie("area_types", () -> {
|
metrics.addCustomChart(new DrilldownPie("area_types", () -> {
|
||||||
final Map<String, Map<String, Integer>> map = new HashMap<>();
|
final Map<String, Map<String, Integer>> map = new HashMap<>();
|
||||||
for (final PlotAreaType plotAreaType : PlotAreaType.values()) {
|
for (final PlotAreaType plotAreaType : PlotAreaType.values()) {
|
||||||
final Map<String, Integer> terrainTypes = new HashMap<>();
|
final Map<String, Integer> terrainTypes = new HashMap<>();
|
||||||
@ -1048,18 +1050,18 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
|
|||||||
}
|
}
|
||||||
return map;
|
return map;
|
||||||
}));
|
}));
|
||||||
metrics.addCustomChart(new Metrics.SimplePie(
|
metrics.addCustomChart(new SimplePie(
|
||||||
"premium",
|
"premium",
|
||||||
() -> PremiumVerification.isPremium() ? "Premium" : "Non-Premium"
|
() -> PremiumVerification.isPremium() ? "Premium" : "Non-Premium"
|
||||||
));
|
));
|
||||||
metrics.addCustomChart(new Metrics.SimplePie("worlds", () -> Settings.Enabled_Components.WORLDS ? "true" : "false"));
|
metrics.addCustomChart(new SimplePie("worlds", () -> Settings.Enabled_Components.WORLDS ? "true" : "false"));
|
||||||
metrics.addCustomChart(new Metrics.SimplePie("economy", () -> Settings.Enabled_Components.ECONOMY ? "true" : "false"));
|
metrics.addCustomChart(new SimplePie("economy", () -> Settings.Enabled_Components.ECONOMY ? "true" : "false"));
|
||||||
metrics.addCustomChart(new Metrics.SimplePie(
|
metrics.addCustomChart(new SimplePie(
|
||||||
"plot_expiry",
|
"plot_expiry",
|
||||||
() -> Settings.Enabled_Components.PLOT_EXPIRY ? "true" : "false"
|
() -> Settings.Enabled_Components.PLOT_EXPIRY ? "true" : "false"
|
||||||
));
|
));
|
||||||
metrics.addCustomChart(new Metrics.SimplePie("database_type", () -> Storage.MySQL.USE ? "MySQL" : "SQLite"));
|
metrics.addCustomChart(new SimplePie("database_type", () -> Storage.MySQL.USE ? "MySQL" : "SQLite"));
|
||||||
metrics.addCustomChart(new Metrics.SimplePie(
|
metrics.addCustomChart(new SimplePie(
|
||||||
"worldedit_implementation",
|
"worldedit_implementation",
|
||||||
() -> Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null ? "FastAsyncWorldEdit" : "WorldEdit"
|
() -> Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null ? "FastAsyncWorldEdit" : "WorldEdit"
|
||||||
));
|
));
|
||||||
|
Loading…
Reference in New Issue
Block a user