fix aliases not being registered

This commit is contained in:
kento2 2026-04-16 21:53:59 +02:00
parent 124e65a472
commit 00eb51595d
4 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,4 @@
As of v2.0.1, a command for getting/setting coins of a player could look like this: As of v2.0.2, a command for getting/setting coins of a player could look like this:
```java ```java
public class CoinsCommand { public class CoinsCommand {

View file

@ -9,7 +9,7 @@ plugins {
} }
group = "de.kentoj" group = "de.kentoj"
version = "2.0.1" version = "2.0.2"
fun scrowRepo(handler: RepositoryHandler) = handler.maven { fun scrowRepo(handler: RepositoryHandler) = handler.maven {
name = "scrow" name = "scrow"
@ -38,7 +38,7 @@ dependencies {
// https://mvnrepository.com/artifact/org.jetbrains/annotations // https://mvnrepository.com/artifact/org.jetbrains/annotations
implementation("org.jetbrains:annotations:26.0.2-1") implementation("org.jetbrains:annotations:26.0.2-1")
api("de.kentoj:kencommandapi-core:2.0.1") api("de.kentoj:kencommandapi-core:2.0.2")
api("org.spigotmc:spigot-api:1.21.11-R0.1-SNAPSHOT") api("org.spigotmc:spigot-api:1.21.11-R0.1-SNAPSHOT")
implementation("org.spigotmc:spigot-api:1.21.11-R0.1-SNAPSHOT") implementation("org.spigotmc:spigot-api:1.21.11-R0.1-SNAPSHOT")

View file

@ -6,6 +6,8 @@ import org.bukkit.command.Command;
import org.bukkit.command.CommandSender; import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import java.util.Arrays;
public class BukkitKenCommand extends Command { public class BukkitKenCommand extends Command {
private final CommandNode<CommandSender, BukkitCommandContext> rootNode; private final CommandNode<CommandSender, BukkitCommandContext> rootNode;
@ -18,6 +20,7 @@ public class BukkitKenCommand extends Command {
super(rootNode.getNames()[0]); super(rootNode.getNames()[0]);
this.rootNode = rootNode; this.rootNode = rootNode;
this.commandManager = commandManager; this.commandManager = commandManager;
this.setAliases(Arrays.asList(rootNode.getNames()));
} }
@Override @Override

View file

@ -8,7 +8,7 @@ plugins {
} }
group = "de.kentoj" group = "de.kentoj"
version = "2.0.1" version = "2.0.2"
repositories { repositories {
mavenCentral() mavenCentral()