This commit is contained in:
Jesse Boyd
2018-08-17 18:27:48 +10:00
parent 29a364865d
commit 36ede1b27d
10 changed files with 186 additions and 72 deletions

View File

@ -284,20 +284,20 @@ public class GenerationCommands extends MethodCommands {
public void forestGen(Player player, LocalSession session, EditSession editSession, @Optional("10") int size, @Optional("tree") TreeType type, @Optional("5") double density) throws WorldEditException, ParameterException {
density = density / 100;
int affected = editSession.makeForest(session.getPlacementPosition(player), size, density, type);
player.print(affected + " trees created.");
player.print(BBC.getPrefix() + affected + " trees created.");
}
@Command(
aliases = {"pumpkins"},
usage = "[size]",
usage = "[size=10] [density=0.02]",
desc = "Generate pumpkin patches",
min = 0,
max = 1
max = 2
)
@CommandPermissions("worldedit.generation.pumpkins")
@Logging(POSITION)
public void pumpkins(Player player, LocalSession session, EditSession editSession, @Optional("10") int apothem) throws WorldEditException, ParameterException {
int affected = editSession.makePumpkinPatches(session.getPlacementPosition(player), apothem);
public void pumpkins(Player player, LocalSession session, EditSession editSession, @Optional("10") int apothem, @Optional("0.02") double density) throws WorldEditException, ParameterException {
int affected = editSession.makePumpkinPatches(session.getPlacementPosition(player), apothem, density);
BBC.COMMAND_PUMPKIN.send(player, affected);
}