diff options
| author | Luck <git@lucko.me> | 2018-05-29 18:45:16 +0100 |
|---|---|---|
| committer | Luck <git@lucko.me> | 2018-05-29 18:45:16 +0100 |
| commit | a092e8b1495dc75ff57978985d973185d15e7449 (patch) | |
| tree | 37c8fcfbfb5d11e893cd975530024d666f9f3ff2 /bungeecord | |
| parent | fd01dfd3a461e36ab2966db7119732f739905912 (diff) | |
| download | spark-a092e8b1495dc75ff57978985d973185d15e7449.tar.gz spark-a092e8b1495dc75ff57978985d973185d15e7449.tar.bz2 spark-a092e8b1495dc75ff57978985d973185d15e7449.zip | |
Improvements for the BungeeCord version
* Use /gprofiler and /sparkbungee aliases so the normal commands reach the backend server
* Profile all threads by default
Diffstat (limited to 'bungeecord')
| -rw-r--r-- | bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java b/bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java index c23e303..717497c 100644 --- a/bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java +++ b/bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java @@ -1,6 +1,7 @@ package me.lucko.spark.bungeecord; import me.lucko.spark.common.CommandHandler; +import me.lucko.spark.profiler.ThreadDumper; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.CommandSender; @@ -29,11 +30,16 @@ public class SparkBungeeCordPlugin extends Plugin { protected void runAsync(Runnable r) { getProxy().getScheduler().runAsync(SparkBungeeCordPlugin.this, r); } + + @Override + protected ThreadDumper getDefaultThreadDumper() { + return new ThreadDumper.All(); + } }; @Override public void onEnable() { - getProxy().getPluginManager().registerCommand(this, new Command("spark", null, "profiler") { + getProxy().getPluginManager().registerCommand(this, new Command("sparkbungee", null, "gprofiler") { @Override public void execute(CommandSender sender, String[] args) { if (!sender.hasPermission("spark.profiler")) { |
