Solved Ender peal item cooldown effect

Discussion in 'Plugin Development' started by sago92, Apr 23, 2019.

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

    sago92

    Hello togehter,

    I am currently developing a plugin for my RPG Server. I created a ability system where every ability has a cooldown. To make the cooldown visible I want to use the effect the ender peal is using.

    [​IMG]

    I tried to use google and the forum search but I coulnd't figure out how this effect is applied. Is it using NMS? NBTTags? or maybe something else?

    Does anybody has a source or an example for me how I can apply this effect to other items?

    Best Regards
     
  2. Offline

    Grauly

    A Player has the Method .setCooldown(Material material,int ticks) that is probably what you are looking for.
    To Note is that all Items (e.g. when applying to a paper) that all Items with the same id (so all other Papers) get the Cooldown too.
    Also, you can read the current Cooldown on that Item (Material) with .getCooldown(Material material).

    Hope this helps you!
     
  3. Offline

    sago92

    That was exactly what I was looking for. Thank you very much for your help! :)
     
Thread Status:
Not open for further replies.

Share This Page