Improving our greet command
In this page, we will make our greet more customizable and robust.
Setting a description
public class GreetCommands {
@Command("greet")
+ @Description("Greets the specified player")
public void greet(BukkitCommandActor actor, Player target) {
target.sendMessage("Welcome, " + target.getName() + "!");
}
}class GreetCommands {
@Command("greet")
+ @Description("Greets the specified player")
fun greet(actor: BukkitCommandActor, target: Player) {
target.sendMessage("Welcome, " + target.name + "!")
}
}
Setting a permission
Setting default values

Last updated
Was this helpful?