Okay, I have an SMP server and I don't want monsters to spawn near my spawn area or anywhere within it. Also, I have built castle walls around it and a huge house (which keeps getting destroyed), but they still spawn inside; is there any way to fix this?
I suspect this has been asked before, but I can't find the question so I'll answer this one:
Aggressive monsters, with the exception of ghasts, will spawn when the light level is at 7 or below. Torches are considered a light source of level 14, Lava, Glowstone, and Fire are at level 15. For each square away from the light source, you drop the light level by 1. If multiple light sources are affecting that square, the highest light level is taken. Glass does not lower light levels as it passes through (anymore than the normal amount), water and ice adds an additional 2 levels of penalty.
Monsters also cannot spawn within 24 squares of the player, and monsters will not spawn if you go to sleep in a bed to skip the night. If every player in SMP is in bed by the time night comes around, then the night will be skipped.
Finally, keep in mind that spiders can now climb walls so even though you have built a wall around your house, you may still find spiders from within. So make sure that you build a roof.