🐛 Fix issues with the help system

This commit is contained in:
Alexander Söderberg 2020-12-18 19:35:00 +01:00 committed by Alexander Söderberg
parent 97e447739c
commit c48eb28434
2 changed files with 20 additions and 4 deletions

View file

@ -274,7 +274,15 @@ public final class ExamplePlugin extends JavaPlugin {
player.sendMessage(ChatColor.RED + "No entity matched your query.");
}
}).execute()
));
))
.command(builder.literal("teleport")
.meta(CommandMeta.DESCRIPTION, "Teleport to a world")
.argument(WorldArgument.of("world"), Description.of("World to teleport to"))
.handler(context -> manager.taskRecipe().begin(context).synchronous(ctx -> {
final Player player = (Player) ctx.getSender();
player.teleport(ctx.<World>get("world").getSpawnLocation());
player.sendMessage(ChatColor.GREEN + "You have been teleported!");
}).execute()));
manager.command(builder.literal("tasktest")
.handler(context -> manager.taskRecipe()
.begin(context)