I am looking at the wiki http://minecraft.gamepedia.com/Commands#clear for the /clear command and it says the command is supposed to fail when "no items are removed (except when maxCount is 0)"
Could someone give me the correct syntax so that this will fail correctly when a player has no items in inventory? Specifically I am testing for diamonds, but you can use any example you want.
The result I am looking for is that if a player has 1 or more diamonds in inventory, the command block will show success (either through a comparator or a conditional cmd block.) If the player has no diamonds, the comparator should be off or the conditional command block should fail.
I have tried all the combinations I can think of, but it always succeeds.
Any help is appreciated, but please test results before posting and don't just say "This example should work"
Am I missing something here or misunderstanding the question because the answer is just straigthforward.
/clear @a minecraft:diamond -1 0
for detection without deleting and
/clear @a minecraft:diamond -1 -1
For detrction and deleting.
That's basicly what this command does though.
OK, I did a little playing around and it looks like this may be a spigot issue. It seems to work fine on single player, but not on my server .,, so likely to be either a plugin or spigot itself
Am I missing something here or misunderstanding the question because the answer is just straigthforward.
/clear @a minecraft:diamond -1 0
for detection without deleting and
/clear @a minecraft:diamond -1 -1
For detrction and deleting.
That's basicly what this command does though.
Try not to use @a on command blocks as further down the road, you would most likely needing a repeating command block. When a repeating command block continues to activate using @a, even if you've died, if will still activate. So try using @p, now if you said,"I am using multiplayer, @p will only target the nearest player, so how?" Well, the answer is pretty simple, just use @e[type=Player]
Since you have spigot, I'd assume you have some plugins on the server. The minecraft: beginning is to make it run from the vanilla /clear command instead of using something else, like the /clear from bukkit essentials.
Since you have spigot, I'd assume you have some plugins on the server. The minecraft: beginning is to make it run from the vanilla /clear command instead of using something else, like the /clear from bukkit essentials.
It doesn't work in pure vanilla minecraft. If the server has bukkit essentials, then you need a "minecraft:" before a command if you don't want to run the bukkit essentials version of it. Since I noticed he was in a server with spigot, I figured that was the problem.
I am looking at the wiki http://minecraft.gamepedia.com/Commands#clear for the /clear command and it says the command is supposed to fail when "no items are removed (except when maxCount is 0)"
Could someone give me the correct syntax so that this will fail correctly when a player has no items in inventory? Specifically I am testing for diamonds, but you can use any example you want.
The result I am looking for is that if a player has 1 or more diamonds in inventory, the command block will show success (either through a comparator or a conditional cmd block.) If the player has no diamonds, the comparator should be off or the conditional command block should fail.
I have tried all the combinations I can think of, but it always succeeds.
Any help is appreciated, but please test results before posting and don't just say "This example should work"
Thank you
You can add some more NBT tags if you want to clear a named diamond
If succeeds
If it doesn't succeed
You can type
as well
Thanks, but this has nothing to do with named diamonds. Please read the OP
OK, I did a little playing around and it looks like this may be a spigot issue. It seems to work fine on single player, but not on my server .,, so likely to be either a plugin or spigot itself
thanks
Try not to use @a on command blocks as further down the road, you would most likely needing a repeating command block. When a repeating command block continues to activate using @a, even if you've died, if will still activate. So try using @p, now if you said,"I am using multiplayer, @p will only target the nearest player, so how?" Well, the answer is pretty simple, just use @e[type=Player]
Are you even reading posts or just saying whatever is in your head?
I was trying to tell him why not to use @a but use @p
Yeah, I got that man, but it has nothing to do with the topic ... also you are completely wrong about not using @a anyways so stop trying to hijack
I know it has nothing to do with the topic, but I reminded him becuase what he's saying may not be good to use for him in the future? can understand?
holy ****, unsubscribe
Have you tried using this:
Since you have spigot, I'd assume you have some plugins on the server. The minecraft: beginning is to make it run from the vanilla /clear command instead of using something else, like the /clear from bukkit essentials.
But it says unknown command
It doesn't work in pure vanilla minecraft. If the server has bukkit essentials, then you need a "minecraft:" before a command if you don't want to run the bukkit essentials version of it. Since I noticed he was in a server with spigot, I figured that was the problem.