Minecraft wiki entry for Building_a_rollercoaster, associated text: Example: To freeze entities that get within 5 blocks of players, with the exception of mobs named Jeff: /execute @e[type=player] ~ ~ ~ /execute @e[type=!player,type=!minecart,name=!Jeff] ~ ~ ~ /tp @s @s