WorldEdit lets you do //chunk to select a chunk, alternatively, if your coordinates x or y are divisible by 16 then you are on a chunk border. You could use the f3 coordinate menu to find the borders then.
LordVakar You could probably do something involving modulus. For example, if the remainder of your location's x co-ordinate divided by 16 is 3, you would subtract 3 from that coordinate to give you the x line of one side of the chunk. To get the other, simply add 16 to that.
Hadenir No. Beeperdp I don't want to use an external plugin but rather code this in, but thanks. dsouzamatt I don't see the math behind that by using remainders hm but it may work I'll test it with 0,0.
LordVakar 0,0,0 and 15,255,15 (world height - 1, so it could be different. World has a method for this), relative to the chunk origin. Chunk x is Math.floor(x/16), Chunk z is Math.floor(z/16). Alternatively use the chunk x and z, and multiply with 16. Then add the relative coords from the begin to those coords and you will have the corners.
LordVakar Chunk is a region 16x16 and 256 blocks high. Do if you have got x and z you can devide you coords by 16. For example: Corners of chunk are on x:16 z:32 and x:32 z:48