diff options
author | Luck <git@lucko.me> | 2021-05-27 23:21:43 +0100 |
---|---|---|
committer | Luck <git@lucko.me> | 2021-05-27 23:21:43 +0100 |
commit | 767995e05d46b416292a713756782f939b16f61f (patch) | |
tree | fb6348c5e70bcbd3c6320bd33fe8a52b63690998 | |
parent | 80f97789b874afb499a2942b7c9af7bbdf588200 (diff) | |
download | spark-767995e05d46b416292a713756782f939b16f61f.tar.gz spark-767995e05d46b416292a713756782f939b16f61f.tar.bz2 spark-767995e05d46b416292a713756782f939b16f61f.zip |
Rename velocity2 classes
-rw-r--r-- | spark-velocity2/src/main/java/me/lucko/spark/velocity/Velocity2CommandSender.java (renamed from spark-velocity2/src/main/java/me/lucko/spark/velocity/VelocityCommandSender.java) | 4 | ||||
-rw-r--r-- | spark-velocity2/src/main/java/me/lucko/spark/velocity/Velocity2PlatformInfo.java (renamed from spark-velocity2/src/main/java/me/lucko/spark/velocity/VelocityPlatformInfo.java) | 4 | ||||
-rw-r--r-- | spark-velocity2/src/main/java/me/lucko/spark/velocity/Velocity2SparkPlugin.java (renamed from spark-velocity2/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java) | 17 |
3 files changed, 13 insertions, 12 deletions
diff --git a/spark-velocity2/src/main/java/me/lucko/spark/velocity/VelocityCommandSender.java b/spark-velocity2/src/main/java/me/lucko/spark/velocity/Velocity2CommandSender.java index f14b521..131e788 100644 --- a/spark-velocity2/src/main/java/me/lucko/spark/velocity/VelocityCommandSender.java +++ b/spark-velocity2/src/main/java/me/lucko/spark/velocity/Velocity2CommandSender.java @@ -30,8 +30,8 @@ import net.kyori.adventure.text.Component; import java.util.UUID; -public class VelocityCommandSender extends AbstractCommandSender<CommandSource> { - public VelocityCommandSender(CommandSource source) { +public class Velocity2CommandSender extends AbstractCommandSender<CommandSource> { + public Velocity2CommandSender(CommandSource source) { super(source); } diff --git a/spark-velocity2/src/main/java/me/lucko/spark/velocity/VelocityPlatformInfo.java b/spark-velocity2/src/main/java/me/lucko/spark/velocity/Velocity2PlatformInfo.java index 3ae6929..cafe6a4 100644 --- a/spark-velocity2/src/main/java/me/lucko/spark/velocity/VelocityPlatformInfo.java +++ b/spark-velocity2/src/main/java/me/lucko/spark/velocity/Velocity2PlatformInfo.java @@ -24,10 +24,10 @@ import com.velocitypowered.api.proxy.ProxyServer; import me.lucko.spark.common.platform.AbstractPlatformInfo; -public class VelocityPlatformInfo extends AbstractPlatformInfo { +public class Velocity2PlatformInfo extends AbstractPlatformInfo { private final ProxyServer proxy; - public VelocityPlatformInfo(ProxyServer proxy) { + public Velocity2PlatformInfo(ProxyServer proxy) { this.proxy = proxy; } diff --git a/spark-velocity2/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java b/spark-velocity2/src/main/java/me/lucko/spark/velocity/Velocity2SparkPlugin.java index cfd8255..a788a59 100644 --- a/spark-velocity2/src/main/java/me/lucko/spark/velocity/VelocitySparkPlugin.java +++ b/spark-velocity2/src/main/java/me/lucko/spark/velocity/Velocity2SparkPlugin.java @@ -33,6 +33,7 @@ import com.velocitypowered.api.proxy.ProxyServer; import me.lucko.spark.common.SparkPlatform; import me.lucko.spark.common.SparkPlugin; import me.lucko.spark.common.platform.PlatformInfo; +import me.lucko.spark.common.util.ClassSourceLookup; import java.nio.file.Path; import java.util.List; @@ -45,7 +46,7 @@ import java.util.stream.Stream; description = "@desc@", authors = {"Luck"} ) -public class VelocitySparkPlugin implements SparkPlugin, SimpleCommand { +public class Velocity2SparkPlugin implements SparkPlugin, SimpleCommand { private final ProxyServer proxy; private final Path configDirectory; @@ -53,7 +54,7 @@ public class VelocitySparkPlugin implements SparkPlugin, SimpleCommand { private SparkPlatform platform; @Inject - public VelocitySparkPlugin(ProxyServer proxy, @DataDirectory Path configDirectory) { + public Velocity2SparkPlugin(ProxyServer proxy, @DataDirectory Path configDirectory) { this.proxy = proxy; this.configDirectory = configDirectory; } @@ -72,17 +73,17 @@ public class VelocitySparkPlugin implements SparkPlugin, SimpleCommand { @Override public void execute(Invocation inv) { - this.platform.executeCommand(new VelocityCommandSender(inv.source()), inv.arguments()); + this.platform.executeCommand(new Velocity2CommandSender(inv.source()), inv.arguments()); } @Override public List<String> suggest(Invocation inv) { - return this.platform.tabCompleteCommand(new VelocityCommandSender(inv.source()), inv.arguments()); + return this.platform.tabCompleteCommand(new Velocity2CommandSender(inv.source()), inv.arguments()); } @Override public String getVersion() { - return VelocitySparkPlugin.class.getAnnotation(Plugin.class).version(); + return Velocity2SparkPlugin.class.getAnnotation(Plugin.class).version(); } @Override @@ -96,11 +97,11 @@ public class VelocitySparkPlugin implements SparkPlugin, SimpleCommand { } @Override - public Stream<VelocityCommandSender> getCommandSenders() { + public Stream<Velocity2CommandSender> getCommandSenders() { return Stream.concat( this.proxy.connectedPlayers().stream(), Stream.of(this.proxy.consoleCommandSource()) - ).map(VelocityCommandSender::new); + ).map(Velocity2CommandSender::new); } @Override @@ -110,6 +111,6 @@ public class VelocitySparkPlugin implements SparkPlugin, SimpleCommand { @Override public PlatformInfo getPlatformInfo() { - return new VelocityPlatformInfo(this.proxy); + return new Velocity2PlatformInfo(this.proxy); } } |