mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-11-04 03:03:43 +01:00 
			
		
		
		
	Update bStats to 2.1.0
This commit is contained in:
		@@ -6,11 +6,6 @@ repositories {
 | 
			
		||||
        url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    maven {
 | 
			
		||||
        name = "CodeMC"
 | 
			
		||||
        url = uri("https://repo.codemc.org/repository/maven-public")
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    maven {
 | 
			
		||||
        name = "PlaceholderAPI"
 | 
			
		||||
        url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/")
 | 
			
		||||
@@ -47,7 +42,7 @@ dependencies {
 | 
			
		||||
    //
 | 
			
		||||
 | 
			
		||||
    // Metrics
 | 
			
		||||
    implementation("org.bstats:bstats-bukkit:1.8")
 | 
			
		||||
    implementation("org.bstats:bstats-bukkit:2.1.0")
 | 
			
		||||
 | 
			
		||||
    // Minecraft
 | 
			
		||||
    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.serializer.legacy.LegacyComponentSerializer;
 | 
			
		||||
import org.bstats.bukkit.Metrics;
 | 
			
		||||
import org.bstats.charts.DrilldownPie;
 | 
			
		||||
import org.bstats.charts.SimplePie;
 | 
			
		||||
import org.bukkit.Bukkit;
 | 
			
		||||
import org.bukkit.Chunk;
 | 
			
		||||
import org.bukkit.Location;
 | 
			
		||||
@@ -1030,7 +1032,7 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
			
		||||
        }
 | 
			
		||||
        this.metricsStarted = true;
 | 
			
		||||
        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<>();
 | 
			
		||||
            for (final PlotAreaType plotAreaType : PlotAreaType.values()) {
 | 
			
		||||
                final Map<String, Integer> terrainTypes = new HashMap<>();
 | 
			
		||||
@@ -1048,18 +1050,18 @@ public final class BukkitPlatform extends JavaPlugin implements Listener, PlotPl
 | 
			
		||||
            }
 | 
			
		||||
            return map;
 | 
			
		||||
        }));
 | 
			
		||||
        metrics.addCustomChart(new Metrics.SimplePie(
 | 
			
		||||
        metrics.addCustomChart(new SimplePie(
 | 
			
		||||
                "premium",
 | 
			
		||||
                () -> PremiumVerification.isPremium() ? "Premium" : "Non-Premium"
 | 
			
		||||
        ));
 | 
			
		||||
        metrics.addCustomChart(new Metrics.SimplePie("worlds", () -> Settings.Enabled_Components.WORLDS ? "true" : "false"));
 | 
			
		||||
        metrics.addCustomChart(new Metrics.SimplePie("economy", () -> Settings.Enabled_Components.ECONOMY ? "true" : "false"));
 | 
			
		||||
        metrics.addCustomChart(new Metrics.SimplePie(
 | 
			
		||||
        metrics.addCustomChart(new SimplePie("worlds", () -> Settings.Enabled_Components.WORLDS ? "true" : "false"));
 | 
			
		||||
        metrics.addCustomChart(new SimplePie("economy", () -> Settings.Enabled_Components.ECONOMY ? "true" : "false"));
 | 
			
		||||
        metrics.addCustomChart(new SimplePie(
 | 
			
		||||
                "plot_expiry",
 | 
			
		||||
                () -> Settings.Enabled_Components.PLOT_EXPIRY ? "true" : "false"
 | 
			
		||||
        ));
 | 
			
		||||
        metrics.addCustomChart(new Metrics.SimplePie("database_type", () -> Storage.MySQL.USE ? "MySQL" : "SQLite"));
 | 
			
		||||
        metrics.addCustomChart(new Metrics.SimplePie(
 | 
			
		||||
        metrics.addCustomChart(new SimplePie("database_type", () -> Storage.MySQL.USE ? "MySQL" : "SQLite"));
 | 
			
		||||
        metrics.addCustomChart(new SimplePie(
 | 
			
		||||
                "worldedit_implementation",
 | 
			
		||||
                () -> Bukkit.getPluginManager().getPlugin("FastAsyncWorldEdit") != null ? "FastAsyncWorldEdit" : "WorldEdit"
 | 
			
		||||
        ));
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user