diff options
author | Luck <git@lucko.me> | 2018-10-08 15:59:50 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2018-10-08 15:59:50 +0100 |
commit | a342e45839970129ce5cdf1f5bad8da5c607106b (patch) | |
tree | d4f32213f809a3d9c59c2a24f4b066b558099e2d /spark-common/src/main/java/me/lucko/spark/common/CommandHandler.java | |
parent | 32bc0480ca20b19dcb04ca62b8934913c8a938c5 (diff) | |
download | spark-a342e45839970129ce5cdf1f5bad8da5c607106b.tar.gz spark-a342e45839970129ce5cdf1f5bad8da5c607106b.tar.bz2 spark-a342e45839970129ce5cdf1f5bad8da5c607106b.zip |
Increment version number
Diffstat (limited to 'spark-common/src/main/java/me/lucko/spark/common/CommandHandler.java')
-rw-r--r-- | spark-common/src/main/java/me/lucko/spark/common/CommandHandler.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/CommandHandler.java b/spark-common/src/main/java/me/lucko/spark/common/CommandHandler.java index b95ce3d..a90f315 100644 --- a/spark-common/src/main/java/me/lucko/spark/common/CommandHandler.java +++ b/spark-common/src/main/java/me/lucko/spark/common/CommandHandler.java @@ -33,7 +33,6 @@ import me.lucko.spark.profiler.ThreadGrouper; import me.lucko.spark.profiler.TickCounter; import java.io.IOException; -import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; @@ -43,7 +42,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; import java.util.regex.Matcher; import java.util.regex.Pattern; -import java.util.stream.Collectors; /** * Abstract command handling class used by all platforms. @@ -67,6 +65,7 @@ public abstract class CommandHandler<T> { // abstract methods implemented by each platform + protected abstract String getVersion(); protected abstract String getLabel(); protected abstract void sendMessage(T sender, String message); protected abstract void sendMessage(String message); @@ -123,7 +122,7 @@ public abstract class CommandHandler<T> { } private void sendInfo(T sender) { - sendPrefixedMessage(sender, "&fspark profiler &7v1.0"); + sendPrefixedMessage(sender, "&fspark profiler &7v" + getVersion()); sendMessage(sender, "&b&l> &7/" + getLabel() + " start"); sendMessage(sender, " &8[&7--timeout&8 <timeout seconds>]"); sendMessage(sender, " &8[&7--thread&8 <thread name>]"); @@ -207,7 +206,7 @@ public abstract class CommandHandler<T> { sendPrefixedMessage("&bProfiler now active!"); if (timeoutSeconds == -1) { - sendPrefixedMessage("&7Use '/profiler stop' to stop profiling and upload the results."); + sendPrefixedMessage("&7Use '/" + getLabel() + " stop' to stop profiling and upload the results."); } else { sendPrefixedMessage("&7The results will be automatically returned after the profiler has been running for " + timeoutSeconds + " seconds."); } |