This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
can I do
@e[type=!Player,type=!Item]
No, it will ignore the type=!Player, and will immediately obey the type=!Item.
However, you can use scoreboard tags to not select them.
Tag all players with "dontSelect":
/scoreboard players tag @a add dontSelect
Then, tag all items with "dontSelect":
/scoreboard players tag @e[type=Item] add dontSelect
Finally, select everything that doesn't have the tag "dontSelect":
@e[tag=!dontSelect]
1.9:
You create a scoreboard, and tag specific entities:
/scoreboard players tag @e[type=Item] add notMatch
/scoreboard players tag @e[type=Player] add notMatch
And to select:
@e[tag=!notMatch]
1.8:
You create a scoreboard dummy, and assign it's possible values to specific entities:
/scoreboard players add notMatch dummy
/scoreboard players add @e[type=Item] notMatch 1
/scoreboard players add @e[tyoe=Player] notMatch 1
@e[score_notMatch_min=1]
note: I am not positive the 1.8 solution will work
OR you could do something simple like:
/execute @e[type=!Player] ~ ~ ~ /execute @e[type=!Item,r=0] ~ ~ ~ (then do your command here)
can I do
@e[type=!Player,type=!Item]
No, it will ignore the type=!Player, and will immediately obey the type=!Item.
However, you can use scoreboard tags to not select them.
Tag all players with "dontSelect":
Then, tag all items with "dontSelect":
Finally, select everything that doesn't have the tag "dontSelect":
1.9:
You create a scoreboard, and tag specific entities:
/scoreboard players tag @e[type=Item] add notMatch
/scoreboard players tag @e[type=Player] add notMatch
And to select:
@e[tag=!notMatch]
1.8:
You create a scoreboard dummy, and assign it's possible values to specific entities:
/scoreboard players add notMatch dummy
/scoreboard players add @e[type=Item] notMatch 1
/scoreboard players add @e[tyoe=Player] notMatch 1
And to select:
@e[score_notMatch_min=1]
note: I am not positive the 1.8 solution will work
OR you could do something simple like:
/execute @e[type=!Player] ~ ~ ~ /execute @e[type=!Item,r=0] ~ ~ ~ (then do your command here)