sekwah41 / Advanced-Portals

An advanced portals plugin for bukkit
GNU Lesser General Public License v3.0
157 stars 65 forks source link

Support for placeholders #315

Open xEllesi opened 2 years ago

xEllesi commented 2 years ago

Add Placeholders to the cooldown of each portal

Usage:

Use scoreboard or holograms to show how mutch time left to the player use the portal again.

example: %advancedportals_portalname_remaintime%

sekwah41 commented 2 years ago

Would you have a link to the API you were wanting to support? we don't currently actually check the times other than when people try to tp and they are user-specific, not global.

xEllesi commented 2 years ago

oh, so its not possible to add that feature right i wanted to use it on scoreboard to show the player how mutch time left to they can enter but if its not possible its ok

imDaniX commented 2 years ago

Would you have a link to the API you were wanting to support? we don't currently actually check the times other than when people try to tp and they are user-specific, not global.

I guess it's PlaceholderAPI. onRequest is called only when placeholder is used, so you can do exactly the same - just calculate cooldown when needed.