XP Popup? Damaged Player?

Discussion in 'Plugin Development' started by Themuddfamily, Jul 24, 2012.

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

    Themuddfamily

    This is the code I have so far and I want :
    player.giveExp(-24);
    To take the EXP from the person hit? But my problem is if the entity is a mob.... Idk how to get around this very simple problem...
     
  2. Offline

    ZeusAllMighty11

    Instead of giving them a negative XP amount (because I don't know if you can do that)

    Why not getTotalExp() then setTotalExp(getTotalExp() - 24)) ?
     
  3. Offline

    Themuddfamily

    NeverMind I worked out


     
  4. Offline

    Themuddfamily

    I just relised the code I posted doesn't work...
     
  5. That's because you casted the event to Player, not the entity :)
     
Thread Status:
Not open for further replies.

Share This Page