.
This commit is contained in:
parent
6449d95b66
commit
254af80fde
2 changed files with 4 additions and 3 deletions
|
|
@ -7,7 +7,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "de.kentoj.scrow"
|
group = "de.kentoj.scrow"
|
||||||
version = "0.8"
|
version = "0.9"
|
||||||
|
|
||||||
fun RepositoryHandler.scrowRepo() = maven {
|
fun RepositoryHandler.scrowRepo() = maven {
|
||||||
name = "scrow"
|
name = "scrow"
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,15 @@ package de.kentoj.kencommandapi;
|
||||||
|
|
||||||
import com.velocitypowered.api.command.CommandSource;
|
import com.velocitypowered.api.command.CommandSource;
|
||||||
import com.velocitypowered.api.proxy.ProxyServer;
|
import com.velocitypowered.api.proxy.ProxyServer;
|
||||||
|
import de.kentoj.kencommandapi.api.nodes.CommandNode;
|
||||||
import de.kentoj.kencommandapi.api.processing.CommandException;
|
import de.kentoj.kencommandapi.api.processing.CommandException;
|
||||||
import de.kentoj.kencommandapi.api.processing.ParsedArgument;
|
import de.kentoj.kencommandapi.api.processing.ParsedArgument;
|
||||||
import de.kentoj.kencommandapi.api.nodes.CommandNode;
|
|
||||||
import de.kentoj.kencommandapi.impl.AbstractKenCommandApi;
|
import de.kentoj.kencommandapi.impl.AbstractKenCommandApi;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import net.kyori.adventure.text.Component;
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.format.NamedTextColor;
|
import net.kyori.adventure.text.format.NamedTextColor;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|
@ -36,7 +37,7 @@ public class VelocityKenCommandApi extends AbstractKenCommandApi<CommandSource,
|
||||||
public void register(CommandNode<CommandSource, VelocityCommandContext> rootNode) {
|
public void register(CommandNode<CommandSource, VelocityCommandContext> rootNode) {
|
||||||
var cm = server.getCommandManager();
|
var cm = server.getCommandManager();
|
||||||
var meta = cm.metaBuilder(rootNode.getNames()[0])
|
var meta = cm.metaBuilder(rootNode.getNames()[0])
|
||||||
.aliases(rootNode.getNames())
|
.aliases(Arrays.copyOfRange(rootNode.getNames(), 1, rootNode.getNames().length - 1))
|
||||||
.build();
|
.build();
|
||||||
cm.register(meta, new VelocityCommand(this, rootNode));
|
cm.register(meta, new VelocityCommand(this, rootNode));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue