fix aliases not being registered
This commit is contained in:
parent
124e65a472
commit
00eb51595d
4 changed files with 7 additions and 4 deletions
|
|
@ -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 {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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")
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "de.kentoj"
|
group = "de.kentoj"
|
||||||
version = "2.0.1"
|
version = "2.0.2"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue