From aa24f0752cb4cb21901d0b11412ca3f3cb6c7fbf Mon Sep 17 00:00:00 2001 From: sk89q Date: Fri, 5 Nov 2010 21:28:58 -0700 Subject: [PATCH] New /ex fire extinguisher command. --- src/WorldEditListener.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/WorldEditListener.java b/src/WorldEditListener.java index 4c5aa5527..a77303c46 100644 --- a/src/WorldEditListener.java +++ b/src/WorldEditListener.java @@ -135,6 +135,7 @@ public class WorldEditListener extends PluginListener { commands.put("//sphere", "[ID] [Radius] - Create a sphere"); commands.put("//hsphere", "[ID] [Radius] - Create a hollow sphere"); commands.put("/fixwater", "[Radius] - Level nearby pools of water"); + commands.put("/ex", "[Size] - Extinguish fires"); commands.put("/forestgen", " - Make an ugly pine tree forest"); commands.put("/pumpkins", " - Make a pumpkin forest"); commands.put("/unstuck", "Go up to the first free spot"); @@ -559,6 +560,17 @@ public class WorldEditListener extends PluginListener { return true; + // Extinguish + } else if (split[0].equalsIgnoreCase("/ex")) { + checkArgs(split, 0, 1, split[0]); + int size = split.length > 1 ? Math.max(1, Integer.parseInt(split[1])) : 40; + + int affected = editSession.removeNear( + session.getPlacementPosition(player), 51, size); + player.print(affected + " block(s) have been removed."); + + return true; + // Load .schematic to clipboard } else if (split[0].equalsIgnoreCase("//load")) { checkArgs(split, 1, 1, split[0]);