Particles cannot be detected/targeted. If you know the location that the particles are being created, you can merely target players at that location:
/testfor @a[10,15,12,1]
I should mention that you have a stray 25
at the end of your /particle
command, when it should either be normal
or force
(otherwise defaulting to normal
).
An alternative to using /particle
in 1.9 is to use an AreaEffectCloud entity, which creates particles at a particular location as well as optionally applying custom potion effects to players who enter the area.
/summon AreaEffectCloud 10 15 12 {Particle:"happyVillager",Radius:1.0f,Duration:2147483647}
You could target players via /execute
and the AreaEffectCloud:
/execute @e[type=AreaEffectCloud] ~ ~ ~ /say @a[r=1]
Alternatively (and more accurately), you could cause the entity to apply an inert custom effect to the player and detect players with that effect. For example, the following gives the player a Resistance effect with an amplifier of -1, which means 0% damage reduction (essentially rendering the actual effect useless, but we can still detect it appropriately).
/summon AreaEffectCloud 10 15 12 {Particle:"happyVillager",Radius:1.0f,Effects:[{Id:11b,Duration:10,Amplifier:-1b,ShowParticles:0b}],Duration:2147483647}
For detection:
/scoreboard players tag @a[tag=inCloud] remove inCloud
/scoreboard players tag @a[tag=!inCloud] add inCloud {ActiveEffects:[{Id:11b,Amplifier:-1b}]}