1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

How to keep xp on death

Discussion in 'Development' started by TwistedAsylumMC, Apr 28, 2018.

  1. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    How can i keep a players xp and not drop xp when they die?
     
  2. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    anyone wanna help or na?
     
  3. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    Cancel the xp drop, and give back the amount of xp
     
    Primus likes this.
  4. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    how do i cancel it
     
  5. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    entity spawn event, check if its an xp orb, and cancel it
     
    Primus likes this.
  6. TwistedAsylumMC

    TwistedAsylumMC Slime

    Messages:
    96
    GitHub:
    twistedasylummc
    how about giving it back to them? maybe i make a variable for their xp, set it when they die then give back when they respawn?
     
  7. Daniktheboss

    Daniktheboss Baby Zombie

    Messages:
    144
    GitHub:
    daniktheboss
    $player->addXp($player->getXpDropAmount());
     
    HyperxXxHound and RyanShaw like this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.