How do i testfor a player using a water bucket with scoreboards?

How do i testfor a player using a water bucket with scoreboards? - From above side view of unrecognizable barefoot female traveler with curly hair typing on netbook while resting on sunbed near swimming pool on sunny day

I'm making a map and I need a way to test if the player uses a water bucket. I tried /scoreboard objectives add <Name> stat.useItem362 and /testfor @a[score_<Name>_min=1]. Did I do anything wrong?



Best Answer

1.8+ uses name IDs for scoreboard statistics, and in 1.9+ you cannot use numerical IDs.

/scoreboard objectives add UseWaterBucket stat.useItem.minecraft.water_bucket

/scoreboard objectives setdisplay sidebar UseWaterBucket

Check the sidebar to confirm usage. In 1.8, the statistic will not increment when you are in creative mode. You will need to be in survival or adventure mode for that stat to increment. In 1.9+, the stat will increment while in creative mode.

Otherwise, your /testfor command is correct:

/testfor @a[score_UseWaterBucket_min=1]



Pictures about "How do i testfor a player using a water bucket with scoreboards?"

How do i testfor a player using a water bucket with scoreboards? - Photo of Man Using Scanner
How do i testfor a player using a water bucket with scoreboards? - Crop male freelancer drinking water while watching laptop in kitchen
How do i testfor a player using a water bucket with scoreboards? - Baby Wearing Green Tank Top



How do you use Testfor player?

Test if Nearest Player is at Level 20 experienceType the command in the chat window and press the Enter key to run the command. Once the cheat has been entered, the testfor command will test the experience level of the nearest player.

How do you know if a player is in water in Minecraft bedrock?

You can detect players who gained the water breathing effect while underwater (but not players who had water breathing beforehand) with @a[scores={difference=0..},nbt=!{ Air:300s}] . It fails to detect players the exact tick they take damage from drowning.



Minecraft Scoreboard Command Tutorial [1.18]




More answers regarding how do i testfor a player using a water bucket with scoreboards?

Answer 2

like the other answer do /scoreboard objectives add useWaterBucket stat.useItem.minecraft.water_bucket And with testfor and command blocks u need to use comparators next to the command block to make it work and so on and hope you got help :)

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Yan Krukov, Tiger Lily, Vlada Karpovich, Oleksandr Pidvalnyi