aboutsummaryrefslogtreecommitdiff
path: root/spark-velocity/src/main/java
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2019-08-03 22:04:20 +0100
committerLuck <git@lucko.me>2019-08-03 22:04:20 +0100
commit2a03b547c7714a130b2bc1407b12a8abd58a9069 (patch)
treec4306958d814964a58c472b959b94afda5ee3800 /spark-velocity/src/main/java
parent4308eda6fd4ce3d637ad29b50f53d870ec1facbc (diff)
downloadspark-2a03b547c7714a130b2bc1407b12a8abd58a9069.tar.gz
spark-2a03b547c7714a130b2bc1407b12a8abd58a9069.tar.bz2
spark-2a03b547c7714a130b2bc1407b12a8abd58a9069.zip
Some more reorganising
Diffstat (limited to 'spark-velocity/src/main/java')
-rw-r--r--spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java (renamed from spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java)26
1 files changed, 7 insertions, 19 deletions
diff --git a/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java b/spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java
index 69217a9..7e98679 100644
--- a/spark-velocity/src/main/java/me/lucko/spark/velocity/SparkVelocityPlugin.java
+++ b/spark-velocity/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java
@@ -32,8 +32,6 @@ import com.velocitypowered.api.plugin.annotation.DataDirectory;
import com.velocitypowered.api.proxy.ProxyServer;
import me.lucko.spark.common.SparkPlatform;
import me.lucko.spark.common.SparkPlugin;
-import me.lucko.spark.common.sampler.ThreadDumper;
-import me.lucko.spark.common.sampler.TickCounter;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.optional.qual.MaybePresent;
@@ -48,7 +46,7 @@ import java.util.stream.Stream;
description = "@desc@",
authors = {"Luck", "sk89q"}
)
-public class SparkVelocityPlugin implements SparkPlugin, Command {
+public class VelocitySparkPlugin implements SparkPlugin, Command {
private final ProxyServer proxy;
private final Path configDirectory;
@@ -56,7 +54,7 @@ public class SparkVelocityPlugin implements SparkPlugin, Command {
private SparkPlatform platform;
@Inject
- public SparkVelocityPlugin(ProxyServer proxy, @DataDirectory Path configDirectory) {
+ public VelocitySparkPlugin(ProxyServer proxy, @DataDirectory Path configDirectory) {
this.proxy = proxy;
this.configDirectory = configDirectory;
}
@@ -85,16 +83,16 @@ public class SparkVelocityPlugin implements SparkPlugin, Command {
@Override
public String getVersion() {
- return SparkVelocityPlugin.class.getAnnotation(Plugin.class).version();
+ return VelocitySparkPlugin.class.getAnnotation(Plugin.class).version();
}
@Override
- public Path getPluginFolder() {
+ public Path getPluginDirectory() {
return this.configDirectory;
}
@Override
- public String getLabel() {
+ public String getCommandName() {
return "sparkv";
}
@@ -107,17 +105,7 @@ public class SparkVelocityPlugin implements SparkPlugin, Command {
}
@Override
- public void runAsync(Runnable r) {
- this.proxy.getScheduler().buildTask(this, r).schedule();
- }
-
- @Override
- public ThreadDumper getDefaultThreadDumper() {
- return ThreadDumper.ALL;
- }
-
- @Override
- public TickCounter createTickCounter() {
- return null;
+ public void executeAsync(Runnable task) {
+ this.proxy.getScheduler().buildTask(this, task).schedule();
}
}