In that case no, you cannot. This is because in order to remove items based on their NBT data, you have to specify a Damage value first. Currently (14w06b) there is no way to specify "any" damage value when using a Damage value in the syntax.
I'm not completely sure, but I know that -1 can be used to specify any damage value in some commands.
I'm making a news sorta thing i guess. Where every minute or so a command block announces some random bit of news. For instance i want a command block to say something like this
<br>/say @r was bruttaly murdered by a @re<br>
@re stands for random entity. Is there a way to actually have a @re command thing.
Or if there is another way of doing it. I have a feeling there isn't.
@r is only specific to players by default, so you could use:
/say @r was brutally murdered by a @r[type=!Player]
However, you would also always have the problem of messages like this appearing:
"<player> was brutally murdered by a item.tile.stone"
"<player> was brutally murdered by a entity.MinecartRideable.name"
"<player> was brutally murdered by a Chicken"
"<player> was brutally murdered by a XPOrb"
"<player> was brutally murdered by a ItemFrame"
To avoid this you could first use a command like:
/scoreboard players set @e UseForMessage 0
(only once you have created the score "UseForMessage")
Then use:
/scoreboard players set @e[type=Zombie] UseForMessage 1
/scoreboard players set @e[type=Spider] UseForMessage 1
/scoreboard players set @e[type=Creeper] UseForMessage 1
/scoreboard players set @e[type=Skeleton] UseForMessage 1
/scoreboard players set @e[type=Wolf] UseForMessage 1
/scoreboard players set @e[type=PigZombie] UseForMessage 1 (which will then output "Zombie Pigman" not "PigZombie")
etc. For each kind of mob you want say did the killing part.
A couple of ticks after this, use:
/say @r was brutally murdered by a @r[score_UseForMessage_min=1]
Also, make sure you do not use mobs that shouldn't have "a" in front of them, eg. The/an Ender Dragon, an Enderman, an Elder Guardian, etc.
You can use these, but you will need to set the objective "UseForMessage" to two instead of one, and three for "the Ender Dragon" , and then have a different /say command:
/say @r was brutally murdered by an @r[score_UseForMessage_min=2,score_UseForMessage=2]
- Replace the '2's with '3's (and the 'an' with 'The') for The Ender Dragon.
I'm not completely sure, but I know that -1 can be used to specify any damage value in some commands.
@r is only specific to players by default, so you could use:
/say @r was brutally murdered by a @r[type=!Player]
However, you would also always have the problem of messages like this appearing:
"<player> was brutally murdered by a item.tile.stone"
"<player> was brutally murdered by a entity.MinecartRideable.name"
"<player> was brutally murdered by a Chicken"
"<player> was brutally murdered by a XPOrb"
"<player> was brutally murdered by a ItemFrame"
To avoid this you could first use a command like:
/scoreboard players set @e UseForMessage 0
(only once you have created the score "UseForMessage")
Then use:
/scoreboard players set @e[type=Zombie] UseForMessage 1
/scoreboard players set @e[type=Spider] UseForMessage 1
/scoreboard players set @e[type=Creeper] UseForMessage 1
/scoreboard players set @e[type=Skeleton] UseForMessage 1
/scoreboard players set @e[type=Wolf] UseForMessage 1
/scoreboard players set @e[type=PigZombie] UseForMessage 1 (which will then output "Zombie Pigman" not "PigZombie")
etc. For each kind of mob you want say did the killing part.
A couple of ticks after this, use:
/say @r was brutally murdered by a @r[score_UseForMessage_min=1]
Also, make sure you do not use mobs that shouldn't have "a" in front of them, eg. The/an Ender Dragon, an Enderman, an Elder Guardian, etc.
You can use these, but you will need to set the objective "UseForMessage" to two instead of one, and three for "the Ender Dragon" , and then have a different /say command:
/say @r was brutally murdered by an @r[score_UseForMessage_min=2,score_UseForMessage=2]
- Replace the '2's with '3's (and the 'an' with 'The') for The Ender Dragon.
This is correct. Though that wasn't available at the time it was posted (14w06b).
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
How To Teleport Entity To My Back? may use this command? /tp @e[type=blablabla] @p ~1 ~ ~ ? Help Me Please