aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2018-05-29 18:45:16 +0100
committerLuck <git@lucko.me>2018-05-29 18:45:16 +0100
commita092e8b1495dc75ff57978985d973185d15e7449 (patch)
tree37c8fcfbfb5d11e893cd975530024d666f9f3ff2 /common
parentfd01dfd3a461e36ab2966db7119732f739905912 (diff)
downloadspark-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 'common')
-rw-r--r--common/src/main/java/me/lucko/spark/common/CommandHandler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/src/main/java/me/lucko/spark/common/CommandHandler.java b/common/src/main/java/me/lucko/spark/common/CommandHandler.java
index 8956fa8..e781404 100644
--- a/common/src/main/java/me/lucko/spark/common/CommandHandler.java
+++ b/common/src/main/java/me/lucko/spark/common/CommandHandler.java
@@ -54,6 +54,7 @@ public abstract class CommandHandler<T> {
protected abstract void sendMessage(T sender, String message);
protected abstract void sendLink(T sender, String url);
protected abstract void runAsync(Runnable r);
+ protected abstract ThreadDumper getDefaultThreadDumper();
private void sendPrefixedMessage(T sender, String message) {
sendMessage(sender, "&8[&fspark&8] &7" + message);
@@ -124,7 +125,7 @@ public abstract class CommandHandler<T> {
ThreadDumper threadDumper;
if (threadName == null) {
// use the server thread
- threadDumper = new ThreadDumper.Specific(new long[]{Thread.currentThread().getId()});
+ threadDumper = getDefaultThreadDumper();
} else if (threadName.equals("*")) {
threadDumper = new ThreadDumper.All();
} else {