Commit Graph

23 Commits

Author SHA1 Message Date
Krakenied 2fb82a2529
Strip price colors 2023-05-20 14:56:06 +02: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 0d08880ed2 Some cleanup of code and deprecated stuff
Also deprecate amount and account setters on the CurrencyCheckEvent,
these values will be final in a future version. Changing them here does
not make sense in the internal structure.
2020-05-03 02:37:06 +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 d51a512ab8 Fix Vault CurrencyAmountEvent listener returning wrong balance 2019-09-06 13:31:19 +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 52492f8469 Support registering of economy providers after the plugin loaded 2019-04-06 16:24:20 +01:00
Phoenix616 03589b3fef Catch Vault issues with null usernames (#158, #194, #205, #209) 2019-03-30 16:09:48 +01:00
Phoenix616 fe85dafec5 Allow configuring what containers can be used for shops (Fixes #175) 2018-10-23 19:14:21 +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
Dan Mulloy fa7a196bab Fix static access 2016-11-21 11:43:09 -05:00
L4BORG 24eb1b1e19 Economy fixes, fix for https://github.com/dmulloy2/ChestShop-3/issues/11 2016-10-13 18:11:23 +02:00
Dan Mulloy a13b2c9070 Fix a few NPE's caused by null accounts
Thanks @mibby
2016-07-07 12:15:43 -04:00
Andrzej Pomirski 28f9f08987 Fix money being transferred to the old username 2015-03-11 18:02:30 +01:00
Andrzej Pomirski f975450130 Fix an issue caused by Spigot/CraftBukkit "forgetting" the usernames
Somehow, OfflinePlayer initiated with an UUID does not contain the
"name" property after a while.
2015-01-17 15:18:32 +01:00
Andrzej Pomirski 9fa2f92ef8 Switch Vault from names to UUIDs 2014-06-14 20:46:59 +02:00
Acrobot 8a9f1c52c7 Protect from extremally high balances 2013-08-26 23:36:36 +02:00
Acrobot 438e3a6ed0 Fix an NPE when Vault was not found 2013-07-22 21:37:59 +02:00
Acrobot 968296f1bb Fix the issue with Admin Shops 2013-07-21 16:51: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 cb265136b0 Update pom.xml 2013-07-13 23:12:02 +02:00