Commit Graph

20 Commits

Author SHA1 Message Date
Phoenix616
3a1885e2f3
Improve logger handling
- Log transactions with custom logger `ChestShop Shops`
- Fix that non-shop log messages show in log file (Fixes #551)
- Fix shop removal logging being broken
- Allow reloading `LOG_TO_FILE` and `LOG_TO_CONSOLE` config options
- Fix the wording in the comments on `LOG_TO_CONSOLE` and `LOG_ALL_SHOP_REMOVALS`
2023-06-18 22:12:08 +01:00
Phoenix616
d52c329618
Make compatible with Folia by using own ExecutorService
Our async tasks were already pretty world-independent (update checker as
 well as some logging so this should work pretty well)

For the rest the ORMLite library should already be able to handle access from
 different threads and whether economy plugins are compatible with Folia is
 up to them, not us...
2023-03-23 23:50:43 +01:00
Phoenix616
99a609b423
Unify sign line parsing and strip owner line whitespace 2022-01-26 20:35:42 +01:00
Phoenix616
6ee7c4759a
Add multi-language and component message support (Requires Spigot)
Message configs are now selected based on the client's language (can be
 toggled in the config) and will use MineDown formatting to allow
 display of component messages as well as usage of RGB colors in 1.16.
If found the legacy local.yml will be used instead of the per-language
 files. Move your local.yml to the correct lang config to if you want to
 use the per-client language option.
Version was also changed to 3.11 due to the many internal changes that
 have accumulated over time
2020-06-28 18:00:09 +01:00
Phoenix616
b300798a62 Make querying of accounts by (short) name an event too 2019-05-06 23:49:16 +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
be5f47cb1f Add config option to toggle if all shop removals should be logged
Removals that happened due to no player being present will always be logged
2019-04-01 13:49:48 +01:00
Phoenix616
1cb481097c Don't refund for non-finished signs (Fixes #141) 2018-06-23 15:01:41 +01:00
Phoenix616
29ef7f25aa Fix errors when server economy account is not defined or invalid 2017-11-15 21:13:07 +01:00
Phoenix616
0525c70452 Rewrite NameManager to support multiple short names per user
This should fix the issue where the player's short name on the shop sign does not reflect the actual player's name. This works by storing every uuid-username combination together with the associated short name and the last time the player logged in with that combination.
2017-07-01 17:14:41 +01:00
Phoenix616
cf2497ff91 Fix potential NPE 2017-06-28 22:11:54 +01:00
Dan Mulloy
e186635484 Try to fix a few more errors
Fixes #7
2016-09-20 15:45:18 -04:00
Andrzej Pomirski
116d22dd62 Sign charge fees should go to the server account 2015-01-08 20:24:40 +01:00
Andrzej Pomirski
6bbfc93b27 Fix the "value already present" error 2014-07-22 22:03:50 +02:00
Andrzej Pomirski
9fa2f92ef8 Switch Vault from names to UUIDs 2014-06-14 20:46:59 +02:00
Andrzej Pomirski
4107b10f4b More UUID changes 2014-04-12 13:57:39 +02:00
Andrzej Pomirski
0328374951 Clean up the imports 2014-04-11 17:37:53 +02:00
Andrzej Pomirski
dd22c709e0 This should cover the basics of UUID change
WARNING: Users with names longer than 15 characters will not be able to
receive money as long as they do not join the server
2014-04-10 22:52:21 +02:00
Acrobot
6d601fd2bf Fix the message spam 2013-12-07 18:31:25 +01:00
Acrobot
e1cb30a0e8 Add shop created/removed logging 2013-08-07 02:03:09 +02:00