Closed felipefoschiera closed 1 year ago
TransactionMessageSender
CurrencyTransferEvent
TransactionEvent
Ran mvn clean install and used the plugin on a local Spigot server.
mvn clean install
Created a shop with a product for $5k, and a defined tax of 10%.
TaxModule#onCurrencyTransfer
Not sure how to link this to the issue - https://github.com/ChestShop-authors/ChestShop-3/issues/526
That makes sense. Done.
Changes
TransactionMessageSender
to be from aCurrencyTransferEvent
, instead ofTransactionEvent
(which creates it)TransactionEvent
inside ofCurrencyTransferEvent
TransactionEvent
(which considers tax) on the message, depending on whether the player is the buyer or sellerCurrencyTransferEvent
constructorTest
Ran
mvn clean install
and used the plugin on a local Spigot server.Created a shop with a product for $5k, and a defined tax of 10%.
Case 1: tax applies (for both users)
Case 2: NoTax permissions apply (for both users)
TaxModule#onCurrencyTransfer
where it "reduces paid amount as the buyer has permission to not pay taxes"