Kill mobs in minecraft?

Br
11

Which command?

an

/ gamerule doMobSpawning false

st

/ gamerule doMobSpawning

Br

Have already tried it, animals disappear net.

an

But no more new ones spawn. So that the old ones disappear

/ kill @e [type =! Player]

(Attention, in older versions you have to capitalize the P of Player!)

Fe

So first:

/ gamerule doMobSpawning false

After that:

(Version 1.10. * Or higher)
/ kill @e [type =! Player]

(Version 1.9. * Or lower)
/ kill @e
(All die, including you…)

The kill commands often have to be spammed.

Ja

/ gamerule doMobSpawning false

gl

You can also type / kill @e [type =! Player] in the older versions.

Are you the type named LeandergamesYT in Minecraft?

Sh

Put your game on Peacefull. Then no more monsters spawn.

I think it's easier than a command.

Edit: If you also want to exhibit animals, you will find the command in the other answers. My mistake.

Fe

Why? I have a new name: xLixon

gl

I know you in real life

Fe

Really?
Who are you? Write a PM / WhatsApp