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

PlaceholderAPI extensions don't always load before AdvancedTabOverlay #27

Open
cyberkitsune opened this issue Jun 21, 2022 · 2 comments

Comments

@cyberkitsune
Copy link

I'm currently having an issue where my AdvancedTabOverlay complains a placeholder doesn't exist at server startup, but PAPI registers it shortly after AdvancedTabOverlay loads. This means the placeholder is ignored until I run /advancedtaboverlay reload once.

[12:02:06 WARN]: [AdvancedTabOverlay] There have been 1 warnings while loading plugins/AdvancedTabOverlay/tabLists/default.yml
WARNING: Error in placeholder ${viewer server_tps_1_colored}:
Unknown placeholder

[12:02:06 INFO]: [PlaceholderAPI] Successfully registered expansion: server [2.6.1]
[12:02:06 INFO]: 1 placeholder hook(s) registered!

I suppose a potential solution to this would to re-evaulate the placeholders later on during enable, or possibly have PAPI as a depend and not a softdepend? (not ideal)

@Andre601
Copy link
Contributor

Having PlaceholderAPI as a depend wouldn't solve anything as it doesn't change when ATO gets enabled.

PlaceholderAPI has three distinct phases:

  • Loading the plugin
  • Enabling the plugin
  • Loading the external expansions once server is done loading

As you may guess by the above list is the issue that expansions are loaded after the server is "done" with starting up while ATO loads tab lists much earlier in the process (probably during its own enable phase).

The best solution for ATO here is to look for the ExpansionsLoadedEvent from PlaceholderAPI which gives a clear indicator of when all expansions got loaded.

@Andre601
Copy link
Contributor

@cyberkitsune CodeCrafter pushed a change to ATO to hopefully fix the issue. Could you try out the latest dev version and let us know if the issue is resolved by it?

Link to latest dev build: https://ci.codecrafter47.de/job/AdvancedTabOverlay/165/

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