Minecraft wiki entry for End_survival, associated text: Whether building or digging the home, the player will need to take measures against endermen spawning in it. The simplest tactic is to make sure that all ceilings are no more than 2 1⁄2 blocks high, so they don't have room to spawn or enter. Where this isn't practical, the player can make floors out of bottom slabs. Then, they can't spawn or teleport there, though they can still walk onto it if they have the headroom. In particular, if you want a secure roof, fence it and make it out of bottom slabs.