public GrowShrinkTool(WorldEditWorkspace workspace, IBlockAccessorRevertable blockAccess) : base(workspace, blockAccess)
 {
     if (!workspace.FloatValues.ContainsKey("std.growShrinkRadius"))
     {
         BrushRadius = 10;
     }
     if (!workspace.IntValues.ContainsKey("std.growShrinkMode"))
     {
         GrowShrinkMode = EnumGrowShrinkMode.Any;
     }
 }
        public override bool OnWorldEditCommand(WorldEdit worldEdit, CmdArgs args)
        {
            switch (args[0])
            {
            case "tm":
                EnumGrowShrinkMode mode = EnumGrowShrinkMode.Any;

                if (args.Length > 1)
                {
                    int index;
                    int.TryParse(args[1], out index);
                    if (Enum.IsDefined(typeof(EnumGrowShrinkMode), index))
                    {
                        mode = (EnumGrowShrinkMode)index;
                    }
                }

                GrowShrinkMode = mode;
                worldEdit.Good(workspace.ToolName + " mode " + mode + " set.");

                return(true);

            case "tr":
                BrushRadius = 0;

                if (args.Length > 1)
                {
                    float size;
                    float.TryParse(args[1], out size);
                    BrushRadius = size;
                }

                worldEdit.Good("Grow/Shrink radius " + BrushRadius + " set");

                return(true);

            case "tgr":
                BrushRadius++;
                worldEdit.Good("Grow/Shrink radius " + BrushRadius + " set");
                return(true);


            case "tsr":
                BrushRadius = Math.Max(0, BrushRadius - 1);
                worldEdit.Good("Grow/Shrink radius " + BrushRadius + " set");
                return(true);
            }

            return(false);
        }