-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
new sign transaction event #6071
base: 2.x
Are you sure you want to change the base?
new sign transaction event #6071
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to declare a HandlerList for the SignTransactionEvent and override the getHandlers method + add a static getHandlerList method which also returns it.
otherwise i just left a few slight style/doc changes.
Essentials/src/main/java/net/ess3/api/events/SignTransactionEvent.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/net/ess3/api/events/SignTransactionEvent.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/net/ess3/api/events/SignTransactionEvent.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/net/ess3/api/events/SignTransactionEvent.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/net/ess3/api/events/SignTransactionEvent.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/net/ess3/api/events/SignTransactionEvent.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/net/ess3/api/events/SignTransactionEvent.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/net/ess3/api/events/SignTransactionEvent.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/signs/SignBuy.java
Outdated
Show resolved
Hide resolved
Essentials/src/main/java/com/earth2me/essentials/signs/SignSell.java
Outdated
Show resolved
Hide resolved
Are the handerlist not inherited by the other event ? So it should not be needed to declare it again, otherwise I think the event wouldn't have worked. |
….java Co-authored-by: Josh Roy <[email protected]>
…l.java Co-authored-by: Josh Roy <[email protected]>
…ent.java Co-authored-by: Josh Roy <[email protected]>
…ent.java Co-authored-by: Josh Roy <[email protected]>
…ent.java Co-authored-by: Josh Roy <[email protected]>
…ent.java Co-authored-by: Josh Roy <[email protected]>
…ent.java Co-authored-by: Josh Roy <[email protected]>
…ent.java Co-authored-by: Josh Roy <[email protected]>
…ent.java Co-authored-by: Josh Roy <[email protected]>
…ent.java Co-authored-by: Josh Roy <[email protected]>
I updated the rest though, thanks :) |
Information
The feature request is here:
#6070
https://gyazo.com/ba209d0b4dd4e4a032e1e0a390e37157
This PR closes #6070.
Details
Proposed feature:
This feature would introduce one new event for external plugins to listen to.
This event is called SignTransactionEvent and is fired when a user buys or sells something from a sign.
The event includes information about the type of transaction(buy/sell), the item bought/sold, how much it was bought/sold for and the sign it was bought at, the event is cancelable.
Environments tested:
OS: Windows 10
Java version: java version "17.0.7"
Demonstration:
https://gyazo.com/b3ab1a544ae3da83c9dd84556a7db415 - gif in 1.8
https://gyazo.com/ddf184d52fe0144690a49e19de0b2c40 - works in 1.12
https://gyazo.com/b68c7554c5ceb455aaa14fc6b4827c1b - works in 1.21
Code used to test it
https://pastebin.com/rcDJbX6s