mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2026-11-24 09:24:24 +00:00
Fix tab completions not being returned for empty strings (#538)
This commit is contained in:
3 files changed
+6
-3
No files matched your search
@@ -47,6 +47,7 @@ import java.util.Optional;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class SpongeCommandExecutor extends CommandManager implements CommandCallable {
|
||||
private static final Splitter TAB_COMPLETE_ARGUMENT_SPLITTER = Splitter.on(COMMAND_SEPARATOR_PATTERN);
|
||||
private static final Splitter ARGUMENT_SPLITTER = Splitter.on(COMMAND_SEPARATOR_PATTERN).omitEmptyStrings();
|
||||
|
||||
private final LPSpongePlugin plugin;
|
||||
@@ -68,7 +69,7 @@ public class SpongeCommandExecutor extends CommandManager implements CommandCall
|
||||
@Override
|
||||
public List<String> getSuggestions(CommandSource source, String s, @Nullable Location<World> location) {
|
||||
Sender lpSender = plugin.getSenderFactory().wrap(source);
|
||||
List<String> arguments = processSelectors(source, Util.stripQuotes(ARGUMENT_SPLITTER.splitToList(s)));
|
||||
List<String> arguments = processSelectors(source, Util.stripQuotes(TAB_COMPLETE_ARGUMENT_SPLITTER.splitToList(s)));
|
||||
|
||||
return onTabComplete(lpSender, arguments);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user