I'm making a city map in Minecraft and I want hostile mobs (ex. Zombies, skeletons, creepers) for players to battle. I don't want passive mobs (ex. Pigs, cows, sheep) to be walking around being annoying like they are. They only get in the way and don't help my build look very much like a city. I need some kind of command to prevent them from spawning naturally on my grass. (NO MODS Please) I will not get rid of any grass.
Added (1). I want hostile mobs to spawn naturally at night. That's why I'm not using /gamerule doMobSpawning false.