No animals in a Minecraft Flat world?

ro
- in Worlds
4

I'm currently playing Minecraft and want to build something in a flat world, but the animals bother me. Also, when I made the world, I didn't find any settings where you could exhibit it. So I wanted to ask if someone knows a command to park animals or where to change that in the world settings.

Be

Execute this command

/ gamerule doMobSpawning false

Dr

Then / kill @e [type =! Player] (preferably two times so that the drops are also deleted)

ro

Thanks for the answers, I wish I could mark both as the most helpful answer, but you can't do it with Endievie04. Hence Wolffe2

Dr

Alright.

I don't really care anyway if I get the star there.