From 8fe381d09854c9c5a24444d3d6ee10b0e66cd942 Mon Sep 17 00:00:00 2001 From: MattBDev Date: Wed, 8 Jun 2016 19:06:07 -0400 Subject: [PATCH] Fix SpongeCommand --- .../sponge/util/SpongeCommand.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeCommand.java b/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeCommand.java index f40c18853..a101e0021 100644 --- a/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeCommand.java +++ b/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeCommand.java @@ -11,6 +11,7 @@ import org.spongepowered.api.command.CommandResult; import org.spongepowered.api.command.CommandSource; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.text.Text; +import org.spongepowered.api.world.World; import java.util.ArrayList; import java.util.Collection; @@ -20,7 +21,7 @@ import java.util.Optional; import java.util.UUID; public class SpongeCommand implements CommandCallable { - + @Override public CommandResult process(CommandSource source, String arguments) throws CommandException { TaskManager.runTask(() -> { @@ -40,9 +41,10 @@ public class SpongeCommand implements CommandCallable { }); return CommandResult.success(); } - + @Override - public List getSuggestions(CommandSource source, String arguments) throws CommandException { + public List getSuggestions(CommandSource source, String arguments, org.spongepowered.api.world.Location targetPosition) + throws CommandException { if (!(source instanceof Player)) { return null; } @@ -60,26 +62,26 @@ public class SpongeCommand implements CommandCallable { result.add(o.toString()); } return result.isEmpty() ? null : result; -} - + } + @Override public boolean testPermission(CommandSource source) { return true; } - + @Override public Optional getShortDescription(CommandSource source) { return Optional.of(Text.of("Shows plot help")); } - + @Override public Optional getHelp(CommandSource source) { return Optional.of(Text.of("/plot")); } - + @Override public Text getUsage(CommandSource source) { return Text.of("/plot "); } - + }