[REQ] Keep XP on Death

Discussion in 'Archived: Plugin Requests' started by Helios_Prime, Nov 30, 2011.

  1. Offline

    Helios_Prime

    Plugin category: [MECH/GEN]

    Suggested name: KeepXP

    What I want: A plugin that allows players to keep their xp on death or only lose a portion (a few levels) instead of all of it.

    Ideas for commands: No commands needed for this plugin.

    Willing to pay up to:
    $0

    Not even sure if this is possible but dying and losing like 30 xp levels and not being able to pick them up afterwards really sucks. ​
     
  2. Offline

    chubbz

    i agree
     
  3. Offline

    The Wiseman

    I am starting development on this immediately. Keep an eye out for the plugin "KeepXP". :)

    EDIT: Sadly I may not be able to do this. There doesn't seem to be an event type of PLAYER_DEATH, only ENTITY_DEATH and my knowledge of bukkit and java is just not extensive enough to figure a way around this. Perhaps with enough time I could, but don't think it is worth it.
     
  4. Offline

    ArcheCane

    Working on it. ;)
     
  5. Offline

    Don Redhorse

    concerning the Entity_Death... you do a instance of Player there..

    otherwise a nice idea and request... it will probably be integrated in DeathTpPlus Version 3.1, so the near future
     
  6. Offline

    Helios_Prime

    If I even remembered any of my java programming experience from school, I'd give this a shot. But I have no reference point on where to start to program a plugin for Bukkit.
     
  7. Offline

    Don Redhorse

  8. Do you still need this plugin? I might be able to make it...
     
  9. Offline

    KaiBB

    instanceof Player...

    I could do this in less than an hour, but if anybody else wants it they got it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 21, 2016
  10. Offline

    Chiller

    Oh gosh...
     
  11. Offline

    Helios_Prime

    Yes I still have a need for this plugin, if you could write it, I would very much appreciate it.
     
  12. Offline

    skore87

    if(event instanceof PlayerDeathEvent){} within the onEntityDeath void for the ENTITY_DEATH type.
     
  13. Offline

    KaiBB

    Like legitimate, Chiller. I know how to do this. I could do it without your help...
     
  14. Offline

    Chiller

    im sure..................
     
  15. Offline

    Don Redhorse

    well deathTpPlus does it already... partial keeping of exp... the exp you normally drop..
     
  16. Offline

    KaiBB

    Sorry, gonna take a little longer than expected. It's almost done, though.
     
  17. Offline

    -_Husky_-

    i could do this if KaiBB doesen't
     
  18. Offline

    KaiBB

    I'm stuck on the part loading the XP back when you spawn... I have it so when you die it saves to a Config and idk how to retrieve it...
     
  19. Offline

    -_Husky_-

    easy
    use int amount = plugin.config.getInt("<path>");
    then on Player_spawn, or that event,

    player.setTotalExperience(amount);

    if you need me to explain more. Pm me I'm happy to help
     
  20. Offline

    Sputnik_15

Share This Page