The Meaning of Life, the Universe, and Everything.
Join Date:
5/3/2016
Posts:
48
Member Details
Scratch that. When I set my score back to 0, the item stays unpickable. I'm afraid that it will also be unpickable to other players with no score also. How do I fix it.
The Meaning of Life, the Universe, and Everything.
Join Date:
3/23/2014
Posts:
53
Member Details
Hey guys, I could use some help on this same topic. I am trying to stop a certain class, player with a score, from picking up certain non-class specific items.
I'm trying to disable a player that has a score of 1 from picking up a certain item off the ground. Is this possible?
You can't directly change the NBT of a player, but you can make the item unpickable if the player gets near it:
This will make the item unpickable only for players with a score of <score> 1.
Thank you it worked!
Scratch that. When I set my score back to 0, the item stays unpickable. I'm afraid that it will also be unpickable to other players with no score also. How do I fix it.
do the opposite of his command then.
/execute @a[score_<score>=0] ~ ~ ~ entitydata @e[r=1] {PickupDelay:0}
<--- click to hatch my dragon(s)
That shouldn't happen, maybe you made a spelling mistake or something else in the first command?
If not, what's the feedback you get from the two commands?
It worked! Thanks guys.
It's problably cause you set the pickup dely to -1, so it will never move or be pick-upabble
<--- click to hatch my dragon(s)
Yes, but the first command makes it pickupable again.
Those two commands need to run after another in order to work properly.
Oh I see now. It could be because you have it set to delay of 1, not 0? Since it's constantly set to 1, it cant decrease
<--- click to hatch my dragon(s)
Also, how do you make it to where a player can only pickup one item even if two items are close to together?
Is it important which item the player can pick up?
Or should he be able to pick up only one of the items and it's irrelevant which one?
Do I put these on a clock?
You actually would only need one command:
/execute @a[score_score_min=1] ~ ~ ~ entitydata @e[type=Item,r=1] {PickupDelay:1}
Now when the player walks away it will go back down to 0, no need to set another command to do what will happen naturally.
However, if someone that cannot pick up items is next to an item, a player that can pick up items will also not be able to pick that item up.
Hey guys, I could use some help on this same topic. I am trying to stop a certain class, player with a score, from picking up certain non-class specific items.
/execute @a[score_Warrior_min=1] ~ ~ ~ entitydata @e[type=minecraft:iron_sword,r=1] {PickupDelay:1}
Keeps jumping back with "UUID is in invalid format. But then when I lowercase "warrior" it just doesn't do anything.
Anyone got any answers?
I'm getting the "All invocations failed" from that 2nd command now?