Minecraft exclamation mark in commands?

sq
- in Worlds
3

The exclamation mark in commands basically means "except", right?

So, for example / kill @e [type =! Minecraft: pig], does that mean that all mobs EXCEPT pigs are killed? If not, how can I understand the exclamation mark?

What I plan to do is a Repeating Commandblock that puts all players in a world EXCEPT myself in Adventure Mode. How does it work?

(Play Vanilla Minecraft Java 1.16.1)

gl

"!" means "not" in programming, so you've already understood it correctly.

What I plan to do is a Repeating Commandblock that puts all players in a world EXCEPT myself in Adventure Mode. How does it work?

/ gamemode @a [name =! YourName] adventure

sq

Thank you.

gl

You're welcome!

With Minecraft commands? sl slashPassbook39
Minecraft weird? Je Jettgeorge
Change Minecraft Code? To Toothpaste602