1
0
mirror of https://github.com/lucko/LuckPerms.git synced 2025-09-09 22:00:40 +02:00

Fix sponge tab complete, fix bungee listeners & change some messages

This commit is contained in:
Luck
2016-08-18 20:14:12 +01:00
parent bfe0126816
commit 31cef46b56
3 changed files with 23 additions and 18 deletions

View File

@@ -31,6 +31,7 @@ import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.text.Text;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
@@ -49,8 +50,12 @@ class SpongeCommand extends CommandManager implements CommandCallable {
@Override
public List<String> getSuggestions(CommandSource source, String s) throws CommandException {
// TODO: fix this so it actually works
return onTabComplete(SpongeSenderFactory.get().wrap(source), Arrays.asList(Patterns.SPACE.split(s)));
List<String> args = new ArrayList<>(Arrays.asList(Patterns.SPACE.split(s)));
if (s.endsWith(" ")) {
args.add("");
}
return onTabComplete(SpongeSenderFactory.get().wrap(source), args);
}
@Override