Enderpearl cooldown with xp bar

Discussion in 'Programming' started by HK_Sushi, Jan 29, 2018.

  1. Sorry but I tried, you had it right, then something blew up somewhere on your side and you decided to change everything because you seems afraid of repeated schedulers. Which isn't a bad thing on its own, but right now this is just an excessive fear, like a phobia or something.

    I'm just going to say it a last time:

    #setExp will update the experience bar
    It isn't because you decrease the cooldown value that the experience bar will update by itself. This is not goddamn magic - I wish it was tho.
    You have to update the experience bar MANUALLY, EVERYTIME the cooldown value change - aka, is decreased by one. In other words, you will NEED a REPEATED SCHEDULER.

    You had it right before you decided to just change everything to something weird - the idea itself wasn't bad, but sadly that's not how things work.
    Hey, lemme even quote the signature of someone that I can't remember: "Computers don't do what you want them to do, but what you tell them to do."
  2. Alright so as I understand I should put the countdown code into the Repeating schedule and let them run
    And check set the player level and exp with
    Code (Text):

    Under scheduler
    p.setLevel(p.getLevel() -1);
    And it is for the Level countdown
    And then I should put the code of the enderpearl cooldown there too
    Right ? @Arektor