Commit Graph

12 Commits

Author SHA1 Message Date
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
fc62ab0823 Use different economy responses and make some events cancellable
Also moved the creation fee subtraction to before the shop was created to be able to cancel the creation
2018-08-22 00:21:34 +01:00
Phoenix616
29ef7f25aa Fix errors when server economy account is not defined or invalid 2017-11-15 21:13:07 +01:00
Andrzej Pomirski
9fa2f92ef8 Switch Vault from names to UUIDs 2014-06-14 20:46:59 +02:00
Acrobot
06b9749467 Remove obsolete EconomyManager 2013-07-13 23:22:36 +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
c86ffb623a Add an external Vault dependency 2013-05-30 16:57:54 +02:00
James Clarke
3098a38ba9 Only check if a bank exists when banks are supported 2013-04-13 00:13:17 +01:00
James Clarke
6f12dd8464 Added support for bank accounts 2013-04-12 18:23:34 +01:00
Acrobot
be46ac065f Fix the money bug 2013-03-11 00:32:11 +01:00
Acrobot
a5bfa86bca Mavenized the project
Switched the project to Maven - you're now able to easily build
ChestShop.
2013-03-08 20:31:15 +01:00