BAZEL + some code

This commit is contained in:
kento2 2026-08-02 21:23:36 +02:00
parent dd25337ed6
commit 4db84feb43
44 changed files with 627 additions and 389 deletions

View file

@ -3,7 +3,7 @@ package de.kentoj.kencommandapi;
import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.proxy.ProxyServer;
import de.kentoj.kencommandapi.api.CommandHandler;
import de.kentoj.kencommandapi.api.literal.RootLiteral;
import de.kentoj.kencommandapi.api.literal.Literal;
import lombok.RequiredArgsConstructor;
import java.util.Arrays;
@ -15,7 +15,7 @@ public class CommandAPI {
private final CommandHandler<CommandSource> commandHandler =
new CommandHandler<>(CommandSource::sendMessage, CommandSource::hasPermission);
public void register(RootLiteral<CommandSource> rootNode) {
public void register(Literal<CommandSource> rootNode) {
var cm = server.getCommandManager();
var meta = cm.metaBuilder(rootNode.getNames()[0])
.aliases(Arrays.copyOfRange(rootNode.getNames(), 1, rootNode.getNames().length))

View file

@ -3,7 +3,7 @@ package de.kentoj.kencommandapi;
import com.velocitypowered.api.command.CommandSource;
import com.velocitypowered.api.command.RawCommand;
import de.kentoj.kencommandapi.api.CommandHandler;
import de.kentoj.kencommandapi.api.literal.RootLiteral;
import de.kentoj.kencommandapi.api.literal.Literal;
import lombok.RequiredArgsConstructor;
import java.util.Arrays;
@ -13,7 +13,7 @@ import java.util.List;
public class VelocityCommand implements RawCommand {
private final CommandHandler<CommandSource> commandHandler;
private final RootLiteral<CommandSource> rootNode;
private final Literal<CommandSource> rootNode;
@Override
public void execute(Invocation invocation) {