refactor ig

This commit is contained in:
kento2 2026-08-04 02:30:41 +02:00
parent ef32f9dbc4
commit 336ac4cad5
54 changed files with 528 additions and 444 deletions

View file

@ -0,0 +1,24 @@
package de.kentoj.kencommandapi.suggestionprovider;
import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.proxy.Player;
import com.velocitypowered.api.proxy.ProxyServer;
import de.kentoj.kencommandapi.api.suggestion.SuggestionProvider;
import java.util.List;
public final class PlayerSuggestionProvider implements SuggestionProvider<CommandSource> {
private final ProxyServer proxyServer;
public PlayerSuggestionProvider(ProxyServer proxyServer) {
this.proxyServer = proxyServer;
}
@Override
public List<String> suggest(CommandSource __) {
return proxyServer.getAllPlayers().stream()
.map(Player::getUsername)
.toList();
}
}