Solved Regeneration of Absorption

Discussion in 'Plugin Development' started by TheIronKill, Sep 15, 2014.

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

    TheIronKill

    Hi, I want help to try to create a method that is equal to the regeneration of life, but with the absorption, the absorption effect, not have much time these days to think about the method, I do what I have planned is that the player have ten hearts of absorption, and regenerate like life, excluding hungry, I hope someone can help me or post your algorithm, of course, if you have one.

    Thank you ...
     
  2. Offline

    Yekllurt

    That means you want to create a method wich regenerates every second a halflife?
    If so you just make a schedueler wich get's called every second, then you call the method for adding a half life as long, he dident reach the maximum
     
  3. Offline

    TheIronKill

    Thank you, does not matter, I've solved
     
  4. Get the active potion effects, check the amplifier that they have and then apply a new effect with a higher aplifier.
    You will have to handle the case of no absorption effect and the highest desired amplifier.
     
Thread Status:
Not open for further replies.

Share This Page