CFI changeset

This commit is contained in:
Jesse Boyd
2019-11-08 05:27:04 +00:00
parent 82f5c4ebed
commit faa63b0c35
11 changed files with 88 additions and 53 deletions

View File

@ -84,12 +84,18 @@ public class ApplyBrushCommands {
);
builder.condition(new PermissionCondition(ImmutableSet.of("worldedit.brush.apply")));
builder.addParts(REGION_FACTORY, RADIUS);
builder.addPart(SubCommandPart.builder(TranslatableComponent.of("type"), TextComponent.of("Type of brush to use"))
.withCommands(manager.getAllCommands().collect(Collectors.toList()))
.required()
.build());
.withCommands(manager.getAllCommands().collect(Collectors.toList()))
.required()
.build());
builder.addParts(REGION_FACTORY, RADIUS);
builder.action(new org.enginehub.piston.Command.Action() {
@Override
public Object run(CommandParameters commandParameters) throws Exception {
System.out.println("Action " + commandParameters);
return null;
}
});
});
}
@ -109,6 +115,7 @@ public class ApplyBrushCommands {
Player player, LocalSession localSession,
@Arg(desc = "The type of tree to plant")
TreeGenerator.TreeType type) throws WorldEditException {
System.out.println("FOREST");
setApplyBrush(parameters, player, localSession, new TreeGeneratorFactory(type));
}