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

Placeholder for expiration group #30

Open
PanHaskins opened this issue Oct 28, 2021 · 3 comments
Open

Placeholder for expiration group #30

PanHaskins opened this issue Oct 28, 2021 · 3 comments

Comments

@PanHaskins
Copy link

Please add placeholder %luckperms_highest_group_by_weight_expiration% or %luckperms_exipration_group%
So that "VIP" players know when their best VIP ends. + so that it is possible to somehow set the expiration format eg 1w 1d 1h to another language for example or just limit the format to 1w / 1d only, ... From what I've looked at placeholders, none of that is what I imagine. Just to show you the expiration time of the highest group you have, and if it doesn't find your expiration time, it will tell you that you have that group forever.

@SrBedrock
Copy link

SrBedrock commented May 31, 2022

+ so that it is possible to somehow set the expiration format eg 1w 1d 1h to another language for example or just limit the format to 1w / 1d only, ... From what I've looked at placeholders, none of that is what I imagine.

1. Maybe add a setting to decide how to view the time remaining formatted? Example config from PlaceholderAPI config.yml:

  luckperms:
    time:
      weeks: w
      days: d
      hours: h
      minutes: m
      seconds: s

2. Display the time in some measure such as seconds and let each admin format it as they see fit. Example in seconds without breaking compatibility with users who are currently using the placeholder:

raw (new placeholder): %luckperms_group_expiry_time_<group>_raw% = 86399

formatted (current form): %luckperms_group_expiry_time_<group>% = 23h 59m 59s

So we can display the value in several languages, not everyone wants to show the time in the USA standard.

Example:

  luckperms:
    time:
      weeks: sem
      days: d
      hours: h
      minutes: m
      seconds: s

%luckperms_group_expiry_time_<group>% = 4sem 2d 50m 30s

@ZeromaniacMc
Copy link

@SrBedrock You're by far not the only one asking for this so I took it into my own hands to make something to help with this. If you don't mind using a javascript, perhaps give this one a try https://github.com/ZeromaniacMc/LuckPerms-Time-Placeholder-Script

@PanHaskins
Copy link
Author

But I need the highest group the player has. Not that I have to enter a group in the placeholder.

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

3 participants