How to play particles on the player

Discussion in 'Programming' started by JordieNiels, May 4, 2015.

  1. what do i need to use to play particle effects on the player like i want to play a particle effect on my player while its flying so what code do i need to implement to let the particles constantly play on the character?
  2. To start off you can make a recursive BukkitRunnable that plays a particle effect on the current Location of the Player every tick, afterwhich it sets up a delayed run on itself for the next tick.
    Code (Text):
    BukkitRunnable effect = new BukkitRunnable() {
            public void run() {
                    // play particle effect on player position
                    effect.runTaskLater(Plugin, 1);
    Don't forget to put a cancel option or condition in there somewhere, or it will go on until the end of time after you've called run() once on the runnable.