Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New placeholders that show expiry time of permissions/groups but in seconds. #38

Open
TheIntolerant opened this issue Oct 11, 2022 · 1 comment

Comments

@TheIntolerant
Copy link

TheIntolerant commented Oct 11, 2022

Description

I was happing to use this info inside a script to compare permission nodes' expiry time and then have the output depend on which permission node has the longest expiry time. Just haven't been able to figure out how to get the time in seconds.

As it is right now, the only placeholder that shows such information, show it in a human-readable format
image

This information isn't helpful when wanting to use it in a script etc. and since I'm unsure of how else I could get the expiry time in seconds, I am unable to compare it to another permission node, inside of my Scripts / JavaSciprt placeholders etc.

Proposed Behaviour

The suggested placeholders could follow this format.

Placeholder Argument Description
%luckperms_expiry_time_in_seconds% <permission> Gets the duration remaining on a temporary permission assigned directly to the player in seconds.
%luckperms_inherited_expiry_time_in_seconds% <permission> Gets the duration remaining on a temporary permission assigned directly to or inherited by the player in seconds.
%luckperms_group_expiry_time_in_seconds% <group name> Gets the duration remaining on a temporary group membership assigned directly to the player in seconds.
%luckperms_inherited_group_expiry_time_in_seconds% <group name> Gets the duration remaining on a temporary group membership assigned directly to or inherited by the player in seconds.

Extra Details

n/a

@OmegaWeaponDev
Copy link

This is a good suggestion, however in the mean time you could probably look into something like PlaceholderAPI's Formatter placeholder Expansion to change the output of it.

https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/Placeholders#formatter

@lucko lucko transferred this issue from LuckPerms/LuckPerms Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants