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

[FEAT]: Events (e.g. TransactionEvent) #15

Open
Alex-451 opened this issue Feb 4, 2025 · 6 comments
Open

[FEAT]: Events (e.g. TransactionEvent) #15

Alex-451 opened this issue Feb 4, 2025 · 6 comments
Assignees
Labels
feature A feature request

Comments

@Alex-451
Copy link

Alex-451 commented Feb 4, 2025

Feature Description

An Event for when a transaction happened that includes request and target information as well as the amount of the transaction.
Similar to: https://jd-v2.essentialsx.net/net/essentialsx/api/v2/events/transactionevent

Reasoning

I want to build a plugin that provides transaction history for example.
Having events would be a great addition and would allow for many new features such as dashboards etc.

@Alex-451 Alex-451 added the feature A feature request label Feb 4, 2025
@creatorfromhell
Copy link
Member

creatorfromhell commented Feb 4, 2025

Feature Description

An Event for when a transaction happened that includes request and target information as well as the amount of the transaction. Similar to: https://jd-v2.essentialsx.net/net/essentialsx/api/v2/events/transactionevent

Reasoning

I want to build a plugin that provides transaction history for example. Having events would be a great addition and would allow for many new features such as dashboards etc.

This is out of scope for what VaultUnlocked is and should be handled in the individual plugins, such as essentials. Any implementation inside VaultUnlocked would be overrode when the individual plugins implement the API anyways.

@Alex-451
Copy link
Author

Alex-451 commented Feb 4, 2025

Alright thanks

@Alex-451 Alex-451 closed this as completed Feb 4, 2025
@creatorfromhell
Copy link
Member

Alright thanks

Most economy plugins have an implementation of those events, which you could cross reference what the current vault eco provider is

@creatorfromhell
Copy link
Member

What I would recommend is using a library such as AspectJ and add a listener to the event, I may look at adding this as a functionality in a separate class/library now that I think about it, using aspectj

@Alex-451
Copy link
Author

Alex-451 commented Feb 6, 2025

Thanks for the suggestion. Would I need to listen to the events of the different implementations such as EssentialX or could I also just listen to execution(* net.milkbowl.vault..*(..)) for example?

I am new to aspectj so if you have any tips to help me out I would really appreciate that :)

@creatorfromhell
Copy link
Member

Thanks for the suggestion. Would I need to listen to the events of the different implementations such as EssentialX or could I also just listen to execution(* net.milkbowl.vault..*(..)) for example?

I am new to aspectj so if you have any tips to help me out I would really appreciate that :)

The vault execution, and make sure to listen to vault2 package too since some plugins may utilize the enhanced API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request
Projects
None yet
Development

No branches or pull requests

2 participants