October 2014
Beginner to intermediate
285 pages
6h 24m
English
This plugin runs a BlockIterator for the player, and checks each block along the way, setting a flame effect. The first block that isn’t Air is the target, so we’ll set that to Lava.
For extra punch, I’ve added an effect on each block we traverse:
| | spawnParticle(b.getLocation(), Particle.Type.LAVASPARK); |
The LAVASPARK gives us a nice set of sparks along our line of sight.
I’ve also added a sound effect, using the playSound helper function, which takes a Location, and a Sound (and optionally floats for volume and pitch if you want).
| | playSound(b.getLocation(), SoundEffect.Type.EXPLODE); |
There’s a list of possible effects in the Canary documentation under net.canarymod.api.world.effects.SoundEffect.Type. I picked EXPLODE ...
Read now
Unlock full access