mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-12 04:23:54 +00:00
Add metrics for Residence (#2081)
This commit is contained in:
committed by
GitHub
parent
cd00bf9771
commit
b65f3ce1f8
@ -89,7 +89,6 @@ dependencies {
|
||||
compileOnly(libs.mapmanager) { isTransitive = false }
|
||||
compileOnly(libs.griefprevention) { isTransitive = false }
|
||||
compileOnly(libs.griefdefender) { isTransitive = false }
|
||||
compileOnly(libs.mcore) { isTransitive = false }
|
||||
compileOnly(libs.residence) { isTransitive = false }
|
||||
compileOnly(libs.towny) { isTransitive = false }
|
||||
compileOnly("com.plotsquared:PlotSquared-Bukkit") { isTransitive = false }
|
||||
|
@ -23,6 +23,7 @@ import com.fastasyncworldedit.bukkit.BukkitPermissionAttachmentManager;
|
||||
import com.fastasyncworldedit.bukkit.FaweBukkit;
|
||||
import com.fastasyncworldedit.core.util.UpdateNotification;
|
||||
import com.fastasyncworldedit.core.Fawe;
|
||||
import com.fastasyncworldedit.core.util.WEManager;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.sk89q.bukkit.util.ClassSourceValidator;
|
||||
@ -58,6 +59,7 @@ import com.sk89q.worldedit.world.weather.WeatherTypes;
|
||||
import io.papermc.lib.PaperLib;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bstats.bukkit.Metrics;
|
||||
import org.bstats.charts.SimplePie;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
@ -220,8 +222,9 @@ public class WorldEditPlugin extends JavaPlugin {
|
||||
}
|
||||
|
||||
// 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
|
||||
ServerLib.checkUnsafeForks();
|
||||
// Check if a new build is available
|
||||
|
Reference in New Issue
Block a user