aboutsummaryrefslogtreecommitdiff
path: root/spark-velocity
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2018-10-15 22:00:05 +0100
committerLuck <git@lucko.me>2018-10-15 22:00:05 +0100
commit8e25dac340a07f7a57a13bdde53b0605779ea920 (patch)
tree3f034154fe8630f6cbf5648c9d2cb6b1426b9efe /spark-velocity
parent91775dd2ecc3f3e70dd422f68cf6d06e74db5d49 (diff)
downloadspark-8e25dac340a07f7a57a13bdde53b0605779ea920.tar.gz
spark-8e25dac340a07f7a57a13bdde53b0605779ea920.tar.bz2
spark-8e25dac340a07f7a57a13bdde53b0605779ea920.zip
Implement tab completion, update readme
Diffstat (limited to 'spark-velocity')
-rw-r--r--spark-velocity/build.gradle1
-rw-r--r--spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java10
2 files changed, 6 insertions, 5 deletions
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");
}
}