Commit Graph

9 Commits

Author SHA1 Message Date
Phoenix616 a413e86ccf
Fix transaction message getting sent twice when server economy account is set
This was due to the ServerAccountCorrector calling the economy events another time with the new account.
 Directly setting the new account is the far better approach and has been adjusted for all currency events.
2023-09-26 20:22:15 +01:00
Felipe Foschiera 9842f47f37
Trigger transaction message from CurrencyTransferEvent and consider tax (#534)
Triggers TransactionMessageSender from CurrencyTransferEvent, wrapping TransactionEvent inside of it.
Add logic to showamount after taxes on the message.
2022-10-12 16:37:18 +01:00
Phoenix616 24d89dbc44 Add ability to mark all economic events as handled
This resolves issues when multiple listeners try to handle the same
 events e.g. for group support which would've passed it onto the normal
 listeners leading to errors
2020-05-21 01:08:00 +01:00
Phoenix616 f0bc277566 Move to BigDecimal in all events and use the CurrencyTransferEvent
Also add tax bypass permissions (#204, ChestShop.notax.buy/sell). When buying with that permission the buyer does not have to pay the tax (the seller will still get the reduced amount), when selling the seller will get the full amount instead of one lowered by the tax.
The permissions of the shop owner play no role due to there not being a good way of checking offline player permissions and it being a bit non-obvious for the buying/selling player if a shop would be with or without tax. This way all that gets changed is the amount the player pays/receives and not the shop owner (and the player should know their permissions/rank already)

The transfer event was necessary in order to correctly resolve who triggered the transaction. Economy adapters are now required to implement a listener for each of the events. It's also recommended that economy adapters that support transfers directly use that instead of passing it through subtract and add with the processTransfer method.
2019-04-25 18:44:22 +01:00
Phoenix616 03589b3fef Catch Vault issues with null usernames (#158, #194, #205, #209) 2019-03-30 16:09:48 +01:00
Andrzej Pomirski 9fa2f92ef8 Switch Vault from names to UUIDs 2014-06-14 20:46:59 +02:00
Acrobot bca38b8a79 Transfer to new economy handling
No bank support... sorry @jrtc27, it's coming later!
2013-07-13 23:14:10 +02:00
Acrobot a9102227f6 Add Currency events 2013-05-03 01:57:09 +02:00
Acrobot 94e94e99a2 Fix PriceRestrictionModule 2013-05-03 01:56:43 +02:00