Change fillr default depth

This commit is contained in:
Jesse Boyd 2017-09-02 18:42:43 +10:00
parent 79b88cefaa
commit 000b9e5fe9
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -197,9 +197,10 @@ public class UtilityCommands extends MethodCommands {
)
@CommandPermissions("worldedit.fill.recursive")
@Logging(PLACEMENT)
public void fillr(Player player, LocalSession session, EditSession editSession, Pattern pattern, double radius, @Optional("1") double depth) throws WorldEditException {
public void fillr(Player player, LocalSession session, EditSession editSession, Pattern pattern, double radius, @Optional("-1") double depth) throws WorldEditException {
worldEdit.checkMaxRadius(radius);
Vector pos = session.getPlacementPosition(player);
if (depth == -1) depth = Integer.MAX_VALUE;
int affected = editSession.fillXZ(pos, pattern, radius, (int) depth, true);
player.print(BBC.getPrefix() + affected + " block(s) have been created.");
}