From 0c71e09e79ed50f10b38f267d3280f0be4cab000 Mon Sep 17 00:00:00 2001 From: Luck Date: Thu, 6 May 2021 15:48:31 +0100 Subject: Fix Sponge8 compile.. again --- .../src/main/java/me/lucko/spark/sponge/Sponge8SparkPlugin.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'spark-sponge8/src/main/java/me/lucko/spark/sponge') 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 suggestions(CommandCause cause, ArgumentReader.Mutable arguments) { - return this.plugin.platform.tabCompleteCommand(new Sponge8CommandSender(cause), arguments.input().split(" ")); + public List 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 -- cgit