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

[bug] Special PlaceholderAPI placeholders support #25

Open
joex92 opened this issue Sep 14, 2021 · 3 comments
Open

[bug] Special PlaceholderAPI placeholders support #25

joex92 opened this issue Sep 14, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@joex92
Copy link

joex92 commented Sep 14, 2021

PAPI has an extension called LocalTime, this extension allows you to show localized time this way:
%localtime_timezone_[here-goes-timezone],[time-format]%
so, using this with essentialsx geolocation extension for PAPI it can be used this way:
%localtime_timezone_{geolocation_timezone},HH:mm:ss%
this way it will show the player's local time...


but here's the problem, I tried this:
image
and got this:
image
which just used the default GMT+0 time because the timezone given was incorrect....


then i tried this:
image
and got this:
image
and this in console:

[04:38:34 WARN]: [AdvancedTabOverlay] There have been 1 warnings while loading plugins/AdvancedTabOverlay/tabLists/default.yml
WARNING: Error in placeholder ${viewer localtime_timezone_${viewer geolocation_timezone},HH:mm:ss%}:
Unknown placeholder

Finally I decided to hardcode it:
image
and got this:
image


so it works, but it would always show the same time instead of the viewer's localized time, which is my intention... The problem is that, when using placeholders inside the placeholders, it needs a space before the $ character... anyways, I believe this should be fixed. because there is another PAPI extension, Math, that uses the same principle to use other placeholders...

@Andre601
Copy link
Contributor

Bit less big text would be nice.
We can read.

@joex92
Copy link
Author

joex92 commented Sep 14, 2021

Bit less big text would be nice.
We can read.

I wanted to separate with lines each thing, didn't know how to get rid of big text but I could now, I'm a bit new still to markdown...

@Andre601
Copy link
Contributor

Coming back to this, I can suggest a small workaround for you to solve this issue for the time being.

You can use the Shortcut expansion to bypass this annoying placeholder limitation. You simply need to make a file (i.e. localtime.txt) in the shortcuts folder and have the following content in it:

%localtime_timezone_{geolocation_timezone}%

You would then use ${viewer shortcut_localtime} as the placeholder in your tab and it should work.

@CodeCrafter47 CodeCrafter47 added the bug Something isn't working label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants