Added DoWithUUID function

Hey.

I started working with the mc server code and this is my first pull request that adds #1579.
Please review before merging it.
Style violation - brace should go on a separate line, and the comment on yet another separate line.