mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-10 04:38:35 +00:00
Add -p flag to //drain to allow kelp and watergrass to be removed.
properly fixed #464
This commit is contained in:
@ -326,11 +326,13 @@ public class UtilityCommands {
|
||||
@Arg(desc = "The radius to drain")
|
||||
Expression radiusExp,
|
||||
@Switch(name = 'w', desc = "Also un-waterlog blocks")
|
||||
boolean waterlogged) throws WorldEditException {
|
||||
boolean waterlogged,
|
||||
@Switch(name = 'p', desc = "Also remove water plants")
|
||||
boolean plants) throws WorldEditException {
|
||||
double radius = radiusExp.evaluate();
|
||||
radius = Math.max(0, radius);
|
||||
we.checkMaxRadius(radius);
|
||||
int affected = editSession.drainArea(session.getPlacementPosition(actor), radius, waterlogged);
|
||||
int affected = editSession.drainArea(session.getPlacementPosition(actor), radius, waterlogged, plants);
|
||||
actor.printInfo(TranslatableComponent.of("worldedit.drain.drained", TextComponent.of(affected)));
|
||||
return affected;
|
||||
}
|
||||
|
Reference in New Issue
Block a user