fCraft.DrawCommands.ReplaceHandlerInternal C# (CSharp) Method

ReplaceHandlerInternal() static private method

static private ReplaceHandlerInternal ( [ factory, [ player, [ cmd ) : void
factory [
player [
cmd [
return void
        static void ReplaceHandlerInternal([NotNull] IBrushFactory factory, [NotNull] Player player,
                                           [NotNull] CommandReader cmd) {
            if (factory == null) throw new ArgumentNullException("factory");
            if (player == null) throw new ArgumentNullException("player");
            if (cmd == null) throw new ArgumentNullException("cmd");

            CuboidDrawOperation op = new CuboidDrawOperation(player);

            IBrush brush = factory.MakeBrush(player, cmd);
            if (brush == null) return;

            op.Brush = brush;

            player.SelectionStart(2, DrawOperationCallback, op, Permission.Draw);
            player.MessageNow("{0}: Click or &H/Mark&S 2 blocks.", op.Brush.Description);
        }