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 | |
parent | 32bc0480ca20b19dcb04ca62b8934913c8a938c5 (diff) | |
download | spark-a342e45839970129ce5cdf1f5bad8da5c607106b.tar.gz spark-a342e45839970129ce5cdf1f5bad8da5c607106b.tar.bz2 spark-a342e45839970129ce5cdf1f5bad8da5c607106b.zip |
Increment version number
7 files changed, 31 insertions, 6 deletions
diff --git a/build.gradle b/build.gradle index 59d0393..2d9f2bc 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ allprojects { group = 'me.lucko' - version = '1.0-SNAPSHOT' + version = '1.1-SNAPSHOT' } subprojects { @@ -8,7 +8,7 @@ subprojects { apply plugin: 'maven' ext { - pluginVersion = '1.0.4' + pluginVersion = '1.1.0' } sourceCompatibility = 1.8 diff --git a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java index 41ade05..4a4ae7d 100644 --- a/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java +++ b/spark-bukkit/src/main/java/me/lucko/spark/bukkit/SparkBukkitPlugin.java @@ -48,6 +48,11 @@ public class SparkBukkitPlugin extends JavaPlugin { } @Override + protected String getVersion() { + return SparkBukkitPlugin.this.getDescription().getVersion(); + } + + @Override protected String getLabel() { return "spark"; } diff --git a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java index 7f958c5..deffa2c 100644 --- a/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java +++ b/spark-bungeecord/src/main/java/me/lucko/spark/bungeecord/SparkBungeeCordPlugin.java @@ -50,6 +50,11 @@ public class SparkBungeeCordPlugin extends Plugin { } @Override + protected String getVersion() { + return SparkBungeeCordPlugin.this.getDescription().getVersion(); + } + + @Override protected String getLabel() { return "sparkbungee"; } 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."); } diff --git a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandHandler.java b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandHandler.java index a328ace..8f39c1b 100644 --- a/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandHandler.java +++ b/spark-forge/src/main/java/me/lucko/spark/forge/ForgeCommandHandler.java @@ -37,6 +37,7 @@ import net.minecraft.util.text.Style; import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.event.ClickEvent; +import net.minecraftforge.fml.common.Mod; import java.util.Collections; import java.util.List; @@ -52,6 +53,11 @@ public abstract class ForgeCommandHandler extends CommandHandler<ICommandSender> new ThreadFactoryBuilder().setNameFormat("spark-forge-async-worker").build() ); + @Override + public String getVersion() { + return SparkForgeMod.class.getAnnotation(Mod.class).version(); + } + @SuppressWarnings("deprecation") protected ITextComponent colorize(String message) { TextComponent component = ComponentSerializers.LEGACY.deserialize(message, '&'); diff --git a/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java b/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java index 50952a5..1f65803 100644 --- a/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java +++ b/spark-sponge/src/main/java/me/lucko/spark/sponge/SparkSpongePlugin.java @@ -76,6 +76,11 @@ public class SparkSpongePlugin implements CommandCallable { } @Override + protected String getVersion() { + return SparkSpongePlugin.class.getAnnotation(Plugin.class).version(); + } + + @Override protected String getLabel() { return "spark"; } diff --git a/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java b/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java index fb81d90..d32bf02 100644 --- a/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java +++ b/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java @@ -66,6 +66,11 @@ public class SparkVelocityPlugin { } @Override + protected String getVersion() { + return SparkVelocityPlugin.class.getAnnotation(Plugin.class).version(); + } + + @Override protected String getLabel() { return "sparkvelocity"; } |