Open ChefMC opened 6 years ago
Also I can suggest you BetterAlias plugin for Bukkit to get inspired from it abilities and configuration format. Best alias plugin that I ever seen
Right, I've got to see what's going on there.
Until then I can suggest you to use KtSkript to define the command. It offers command argument completion for all the item types.
https://forums.spongepowered.org/t/ktskript-endless-customizations-for-your-server/24185
registerCommand("i") {
arguments(catalogedElement<ItemType>("item"), optional(integer("amount"))
action(onlyPlayers = true) {
val item = argument<ItemType>("item")
val amount = arguments.getOne<Int>("amount").orElse(1)
player.executeCommand("give ${player.name} ${item.id} $amount")
}
}
Put that into a file like aliases.ktskript
into the 'scripts' folder.
Second command alias is not working. It prints error about that alias is already defined, but this aliases have different arguments count, so they are different