Implemented player name tab completion

This commit is contained in:
Rsl1122 2020-07-13 21:03:55 +03:00 committed by Risto Lahtela
parent 14e009cb67
commit bd5962a1c5

View File

@ -26,6 +26,7 @@ import com.djrapitops.plan.identification.Server;
import com.djrapitops.plan.settings.locale.Locale;
import com.djrapitops.plan.storage.database.DBSystem;
import com.djrapitops.plan.storage.database.queries.objects.ServerQueries;
import com.djrapitops.plan.storage.database.queries.objects.UserIdentifierQueries;
import com.djrapitops.plan.utilities.java.Lists;
import com.djrapitops.plan.utilities.logging.ErrorContext;
import com.djrapitops.plan.utilities.logging.ErrorLogger;
@ -127,7 +128,8 @@ public class PlanCommand {
}
private List<String> playerNames(CMDSender sender, Arguments arguments) {
return Collections.emptyList(); // TODO
String asString = arguments.concatenate(" ");
return dbSystem.getDatabase().query(UserIdentifierQueries.fetchMatchingPlayerNames(asString));
}
private Subcommand serverCommand() {