Skip to content

[bug] Special PlaceholderAPI placeholders support #25

@joex92

Description

@joex92

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions