setKeepInventory(true) not working for PlayerDeathEvent?

Discussion in 'Plugin Development' started by Jomens235, Jan 10, 2015.

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

    Jomens235

    I'm making a plugin that will allow a person that is on duty (a guard) and with a permission that will allow them to keep their inventory. I've been getting help from one of my friends, but he had to go and I can't understand why it won't work. We're using event.setKeepInventory(true); under the PlayerDeathEvent, but it is like it doesn't exist under this event. I was wondering if anyone could help me turn keepInventory on for a player that is onDuty and has a permission.

    My code at the moment (Yes, generic name): http://pastebin.com/7cj5bfE3
     
  2. Offline

    ColaCraft

    Add a debug message to the "else" statement to see if that is what is triggering.
     
  3. Offline

    teej107

    Are there errors? Did you register your event?
     
Thread Status:
Not open for further replies.

Share This Page