aboutsummaryrefslogtreecommitdiff
path: root/spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8SparkPlugin.java
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2021-05-06 15:48:31 +0100
committerLuck <git@lucko.me>2021-05-06 15:48:31 +0100
commit0c71e09e79ed50f10b38f267d3280f0be4cab000 (patch)
treed03428142c70b6a98dbc1a71e110b0a154169b99 /spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8SparkPlugin.java
parentd0063e9907f41425e71f2a21a3c77c9107e3b134 (diff)
downloadspark-0c71e09e79ed50f10b38f267d3280f0be4cab000.tar.gz
spark-0c71e09e79ed50f10b38f267d3280f0be4cab000.tar.bz2
spark-0c71e09e79ed50f10b38f267d3280f0be4cab000.zip
Fix Sponge8 compile.. again
Diffstat (limited to 'spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8SparkPlugin.java')
-rw-r--r--spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8SparkPlugin.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8SparkPlugin.java b/spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8SparkPlugin.java
index 13c5d27..fff93fb 100644
--- a/spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8SparkPlugin.java
+++ b/spark-sponge8/src/main/java/me/lucko/spark/sponge/Sponge8SparkPlugin.java
@@ -36,6 +36,7 @@ import org.spongepowered.api.Game;
import org.spongepowered.api.Server;
import org.spongepowered.api.command.Command;
import org.spongepowered.api.command.CommandCause;
+import org.spongepowered.api.command.CommandCompletion;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.parameter.ArgumentReader;
import org.spongepowered.api.command.registrar.tree.CommandTreeNode;
@@ -51,6 +52,7 @@ import java.nio.file.Path;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.ExecutorService;
+import java.util.stream.Collectors;
import java.util.stream.Stream;
@Plugin("spark")
@@ -147,8 +149,11 @@ public class Sponge8SparkPlugin implements SparkPlugin {
}
@Override
- public List<String> suggestions(CommandCause cause, ArgumentReader.Mutable arguments) {
- return this.plugin.platform.tabCompleteCommand(new Sponge8CommandSender(cause), arguments.input().split(" "));
+ public List<CommandCompletion> complete(CommandCause cause, ArgumentReader.Mutable arguments) {
+ return this.plugin.platform.tabCompleteCommand(new Sponge8CommandSender(cause), arguments.input().split(" "))
+ .stream()
+ .map(CommandCompletion::of)
+ .collect(Collectors.toList());
}
@Override