use of com.sk89q.worldedit.command.util.PermissionCondition in project FastAsyncWorldEdit by IntellectualSites.
the class PaintBrushCommands method register.
public static void register(CommandManagerService service, CommandManager commandManager, CommandRegistrationHandler registration) {
commandManager.register("paint", builder -> {
builder.description(Caption.of("worldedit.brush.paint.description"));
builder.action(org.enginehub.piston.Command.Action.NULL_ACTION);
CommandManager manager = service.newCommandManager();
registration.register(manager, PaintBrushCommandsRegistration.builder(), new PaintBrushCommands());
builder.condition(new PermissionCondition(ImmutableSet.of("worldedit.brush.paint")));
builder.addParts(REGION_FACTORY, RADIUS, DENSITY);
builder.addPart(SubCommandPart.builder(TranslatableComponent.of("type"), Caption.of("worldedit.brush.paint.type")).withCommands(manager.getAllCommands().collect(Collectors.toList())).required().build());
});
}
Aggregations