OMGPIDocs

OMGPI

Source

JavaDocs

SpigotMC

Twinkles

Twinkles are moving colored particles. If you need to mark goals in your game. For example, if goal is to break a block, create a twinkle from mid of that block and 30 blocks higher, and twinkle will move back and forth to that location and 30 blocks up.

To use a twinkle, there is MovingTwinkle class. Do new MovingTwinkle(Location a, Location b, Color c). To delete the twinkle, use twinkle.delete(). OMGPI uses draw() to move the twinkle and show particles every tick. Deleted twinkle may be saved somewhere to custom draw.

Block indicator:

MovingTwinkle tw = new MovingTwinkle(block.getLocation().add(0.5, 0, 0.5),
                                     block.getLocation().add(0.5, 30, 0.5),
                                     MovingTwinkle.fromChatColor(ChatColor.RED));
tw.delete(); //Use this after we are done with it, like if block is broken.