Minecraft wiki entry for Command_blocks_and_functions, associated text: Command blocks can also be used to make a security system. Just put a pressure plate which triggers a command block in front of an iron door, which will be the entrance to the house. Insert the command: kill @e[type=(mob)] and hook it up with chain command blocks to kill different mobs. this is to not kill you or other players. do this second command in a command block to teleport all things in the vicinity: tp @e[r=2] ~(any distance) ~(any distance) ~(any distance)