From 8e25dac340a07f7a57a13bdde53b0605779ea920 Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 15 Oct 2018 22:00:05 +0100 Subject: Implement tab completion, update readme --- spark-velocity/build.gradle | 1 + .../main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'spark-velocity') diff --git a/spark-velocity/build.gradle b/spark-velocity/build.gradle index aeeba60..b7f02e0 100644 --- a/spark-velocity/build.gradle +++ b/spark-velocity/build.gradle @@ -11,4 +11,5 @@ dependencies { blossom { replaceTokenIn('src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java') replaceToken '@version@', project.pluginVersion + replaceToken '@desc@', project.pluginDesc } \ No newline at end of file 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 4cec138..8cc10e1 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 @@ -43,7 +43,7 @@ import net.kyori.text.serializer.ComponentSerializers; id = "spark", name = "spark", version = "@version@", - description = "Spark is a CPU profiling plugin based on sk89q's WarmRoast profiler", + description = "@desc@", authors = {"Luck", "sk89q"} ) public class SparkVelocityPlugin { @@ -59,7 +59,7 @@ public class SparkVelocityPlugin { private void broadcast(Component msg) { SparkVelocityPlugin.this.proxy.getConsoleCommandSource().sendMessage(msg); for (Player player : SparkVelocityPlugin.this.proxy.getAllPlayers()) { - if (player.hasPermission("spark.profiler")) { + if (player.hasPermission("spark")) { player.sendMessage(msg); } } @@ -72,7 +72,7 @@ public class SparkVelocityPlugin { @Override public String getLabel() { - return "sparkvelocity"; + return "sparkv"; } @Override @@ -118,13 +118,13 @@ public class SparkVelocityPlugin { @Subscribe(order = PostOrder.FIRST) public void onEnable(ProxyInitializeEvent e) { this.proxy.getCommandManager().register((sender, args) -> { - if (!sender.hasPermission("spark.profiler")) { + if (!sender.hasPermission("spark")) { TextComponent msg = TextComponent.builder("You do not have permission to use this command.").color(TextColor.RED).build(); sender.sendMessage(msg); return; } SparkVelocityPlugin.this.sparkPlatform.executeCommand(sender, args); - }, "sparkvelocity", "vprofiler"); + }, "sparkv", "sparkvelocity"); } } -- cgit