CC007 / HeadsPluginAPI

The documentation and wiki for the HeadsPluginAPI plugin
MIT License
5 stars 0 forks source link

API feature request - Event on database loaded #25

Open AerWyn81 opened 2 years ago

AerWyn81 commented 2 years ago

Hi,

As seen together on Discord, it would be interesting & comfortable to have access to an event when the plugin has loaded.

CC007 commented 10 months ago

Here is a release candidate (zipped) of the plugin with this feature. HeadsPluginAPI-3.3.0-SNAPSHOT.zip

What this version actually does is send an event when a category is done updating (CategoryUpdatedEvent) and another event when all categories in the batch are done updating (CategoriesUpdatedEvent).

That last one is the one you want to use, based on what you requested.

Also, The plugin itself also has a listener for these events. These listeners will send a message to people configured in the config.yml (if they are online), telling them that the category is / categories are done updating.

I did some of my own testing, but could you unzip it and test if it suits your needs?

AerWyn81 commented 10 months ago

Hi,

Thanks for the integration and the explanations. When I have a bit of time, I'll give it a try.

Also, as it's been a long time since I posted this issue and I've been rereading it diagonally, I don't seem to have seen a way of retrieving a head via an unique id, which would suit my use case. The plugin I'm developing allows the player to give themselves a head with a texture based on a unique id. My goal, if possible, would be to integrate your API so that a player can retrieve a head from it and use it in my plugin like I did for some others where that is possible (https://aerwyn81.github.io/HeadBlocks/#/config/config?id=heads)

CC007 commented 10 months ago

https://cc007.github.io/HeadsPluginAPI/v3.0.0/apidocs/com/github/cc007/headsplugin/api/business/services/heads/HeadSearcher.html#getHead(java.util.UUID)

CC007 commented 10 months ago

Btw, for you to use the events yourself, Here's the api dependency (zipped).

headsplugin-api-3.3.0.zip