Search in sources :

Example 1 with PlaceholdersCommand

use of me.dreamerzero.miniplaceholders.common.PlaceholdersCommand in project MiniPlaceholders by 4drian3d.

the class VelocityPlugin method registerPlatformCommand.

@Override
public void registerPlatformCommand() {
    BrigadierCommand brigadierCMD = new BrigadierCommand(new PlaceholdersCommand<CommandSource>(() -> proxy.getAllPlayers().stream().map(Player::getUsername).toList(), (String st) -> proxy.getPlayer(st).orElse(null)).placeholderTestCommand("vminiplaceholders"));
    proxy.getCommandManager().register(brigadierCMD);
}
Also used : PlaceholdersCommand(me.dreamerzero.miniplaceholders.common.PlaceholdersCommand) Player(com.velocitypowered.api.proxy.Player) BrigadierCommand(com.velocitypowered.api.command.BrigadierCommand)

Aggregations

BrigadierCommand (com.velocitypowered.api.command.BrigadierCommand)1 Player (com.velocitypowered.api.proxy.Player)1 PlaceholdersCommand (me.dreamerzero.miniplaceholders.common.PlaceholdersCommand)1