Commit Graph

9 Commits

Author SHA1 Message Date
Krakenied 2fb82a2529
Strip price colors 2023-05-20 14:56:06 +02:00
Phoenix616 f547995164
Cleanup: Mark EconomyAPI as Nullable and fix potential NPE 2023-03-01 17:37:22 +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 e57bf94923 Don't continue checking if account can hold currency if already done 2020-04-24 14:54:48 +01:00
Phoenix616 04f91aa55b Add warnings about unknown OfflinePlayer to VaultListener
Also improve the ReserveListener by removing the query for the OfflinePlayer object as that's not necessary to use the Reserve economy API as it directly provides methods for UUID usage (and account existence has usually been checked before already)
Also use canAddHoldings to check if economy user can hold money instead of adding and removing.
2019-05-01 17:13:47 +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 355fa58ac4 Properly detect if reserve economy is provided (Fixes #210) 2019-03-18 15:10:18 +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
Daniel V 8ae72e5803 Feature: Reserve Support (#143)
This introduces a new AccountCheckEvent to check if a user actually has an account with the used economy plugin. Also fix CurrencyTransferEvent logic (even though it's not used anywhere currently)
2018-07-11 18:09:07 +01:00