Skip to content

Conversation

@ignissak
Copy link
Contributor

Event ExpansionsLoadedEvent is called on the end of LocalExpansionManager#registerAll().
Resolves #444

Signed-off-by: Jacob Bordas <methalicity@gmail.com>
@ignissak ignissak requested a review from Andre601 August 31, 2020 23:33
@NEZNAMY
Copy link

NEZNAMY commented Nov 1, 2020

Can there also be an API method to check if expansions are loaded in case we "miss" the event? Such as when our plugin is reloaded and we need to check if expansions are loaded.

@Andre601
Copy link
Collaborator

Andre601 commented Nov 1, 2020

Can there also be an API method to check if expansions are loaded in case we "miss" the event? Such as when our plugin is reloaded and we need to check if expansions are loaded.

To check for a specific expansion:
https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java#L204-L213

To get all currently loaded ones:
https://github.com/PlaceholderAPI/PlaceholderAPI/blob/master/src/main/java/me/clip/placeholderapi/PlaceholderAPI.java#L215-L224

@darbyjack darbyjack merged commit 6431bcd into PlaceholderAPI:master Dec 14, 2020
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

Successfully merging this pull request may close these issues.

[Suggestion] Add event for when all expansions have been loaded

4 participants