How to set an item/entity on fire?

Discussion in 'Plugin Development' started by Connor Mahaffey, May 25, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Connor Mahaffey

    This may sound like a weird request, but I'm wondering if there is anyway I can set a player on fire. This could be accomplished directly, or by lighting the block underneath them on fire.

    Does anyone know how to do this? I've tried a couple different methods, including setting the block under the player to lava, then quickly switching it out with the block it used to be, but that didn't work, because the block simply never changed.

    Any help?
     
  2. Offline

    garbagemule

    Have a look at the documentation for the Player interface, and see if it has a method that might suit your needs (hint: it does!) :)
     
  3. Offline

    Connor Mahaffey

    Oh sorry you're right! I saw "setFireTicks" in there, but I thought that simply set how long a player would burn for if they caught fire. You're right, that's what I was looking for. Thank you!
     
    garbagemule likes this.
Thread Status:
Not open for further replies.

Share This Page