Add metrics for Residence (#2081)

This commit is contained in:
Alexander Brandes 2023-02-07 10:47:49 +01:00 committed by GitHub
parent cd00bf9771
commit b65f3ce1f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 8 deletions

View File

@ -10,10 +10,8 @@ worldguard-bukkit = "7.0.7"
mapmanager = "1.8.0-SNAPSHOT" mapmanager = "1.8.0-SNAPSHOT"
griefprevention = "16.18" griefprevention = "16.18"
griefdefender = "2.1.0-SNAPSHOT" griefdefender = "2.1.0-SNAPSHOT"
mcore = "7.0.1"
residence = "4.5._13.1" residence = "4.5._13.1"
towny = "0.98.4.18" towny = "0.98.4.18"
redprotect = "1.9.6"
# Third party # Third party
bstats = "3.0.0" bstats = "3.0.0"
@ -55,10 +53,8 @@ worldguard = { group = "com.sk89q.worldguard", name = "worldguard-bukkit", versi
mapmanager = { group = "com.github.InventivetalentDev", name = "MapManager", version.ref = "mapmanager" } mapmanager = { group = "com.github.InventivetalentDev", name = "MapManager", version.ref = "mapmanager" }
griefprevention = { group = "com.github.TechFortress", name = "GriefPrevention", version.ref = "griefprevention" } griefprevention = { group = "com.github.TechFortress", name = "GriefPrevention", version.ref = "griefprevention" }
griefdefender = { group = "com.griefdefender", name = "api", version.ref = "griefdefender" } griefdefender = { group = "com.griefdefender", name = "api", version.ref = "griefdefender" }
mcore = { group = "com.massivecraft", name = "mcore", version.ref = "mcore" }
residence = { group = "com.bekvon.bukkit.residence", name = "Residence", version.ref = "residence" } residence = { group = "com.bekvon.bukkit.residence", name = "Residence", version.ref = "residence" }
towny = { group = "com.github.TownyAdvanced", name = "Towny", version.ref = "towny" } towny = { group = "com.github.TownyAdvanced", name = "Towny", version.ref = "towny" }
redprotect = { group = "net.fabiozumbi12", name = "redprotect", version.ref = "redprotect" }
# Third Party # Third Party
bstatsBase = { group = "org.bstats", name = "bstats-base", version.ref = "bstats" } bstatsBase = { group = "org.bstats", name = "bstats-base", version.ref = "bstats" }

View File

@ -89,7 +89,6 @@ dependencies {
compileOnly(libs.mapmanager) { isTransitive = false } compileOnly(libs.mapmanager) { isTransitive = false }
compileOnly(libs.griefprevention) { isTransitive = false } compileOnly(libs.griefprevention) { isTransitive = false }
compileOnly(libs.griefdefender) { isTransitive = false } compileOnly(libs.griefdefender) { isTransitive = false }
compileOnly(libs.mcore) { isTransitive = false }
compileOnly(libs.residence) { isTransitive = false } compileOnly(libs.residence) { isTransitive = false }
compileOnly(libs.towny) { isTransitive = false } compileOnly(libs.towny) { isTransitive = false }
compileOnly("com.plotsquared:PlotSquared-Bukkit") { isTransitive = false } compileOnly("com.plotsquared:PlotSquared-Bukkit") { isTransitive = false }

View File

@ -23,6 +23,7 @@ import com.fastasyncworldedit.bukkit.BukkitPermissionAttachmentManager;
import com.fastasyncworldedit.bukkit.FaweBukkit; import com.fastasyncworldedit.bukkit.FaweBukkit;
import com.fastasyncworldedit.core.util.UpdateNotification; import com.fastasyncworldedit.core.util.UpdateNotification;
import com.fastasyncworldedit.core.Fawe; import com.fastasyncworldedit.core.Fawe;
import com.fastasyncworldedit.core.util.WEManager;
import com.google.common.base.Joiner; import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.sk89q.bukkit.util.ClassSourceValidator; import com.sk89q.bukkit.util.ClassSourceValidator;
@ -58,6 +59,7 @@ import com.sk89q.worldedit.world.weather.WeatherTypes;
import io.papermc.lib.PaperLib; import io.papermc.lib.PaperLib;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.bstats.bukkit.Metrics; import org.bstats.bukkit.Metrics;
import org.bstats.charts.SimplePie;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.NamespacedKey; import org.bukkit.NamespacedKey;
@ -220,8 +222,9 @@ public class WorldEditPlugin extends JavaPlugin {
} }
// Enable metrics // Enable metrics
new Metrics(this, BSTATS_ID); Metrics m = new Metrics(this, BSTATS_ID);
m.addCustomChart(new SimplePie("residence", ()
-> WEManager.weManager().getManagers().toString().contains("residence") ? "Yes" : "No"));
// Check if we are in a safe environment // Check if we are in a safe environment
ServerLib.checkUnsafeForks(); ServerLib.checkUnsafeForks();
// Check if a new build is available // Check if a new build is available

View File

@ -34,7 +34,6 @@ dependencies {
implementation("org.apache.logging.log4j:log4j-api") implementation("org.apache.logging.log4j:log4j-api")
// Plugins // Plugins
compileOnly(libs.redprotect) { isTransitive = false }
compileOnly("com.plotsquared:PlotSquared-Core") { isTransitive = false } compileOnly("com.plotsquared:PlotSquared-Core") { isTransitive = false }
// ensure this is on the classpath for the AP // ensure this is on the classpath for the AP