Commit Graph

14 Commits

Author SHA1 Message Date
Phoenix616 b774258051
Remove OddItem support and implement own alias system (Resolves #360)
Reasoning why this is part of the core and not a separate addon:
The impact of this function is extremely lightweight when (almost) no
 aliases are defined so someone who isn't using this should not have a
 worse experience.
Additionally including it in the core (similarly to the discounts,
 taxes and restrictions) promotes it's availability while not massively
 increasing the maintainability.

As for the OddItem removal:
That plugin hasn't been developed for over 7 years and such unique
 plugin support should really be added via separate addon using the
 events system which, with the new ItemStringQueryEvent, now actually
 supports doing that from an external plugin.
If someone really managed to run their own private fork of OddItem for
 all those years then they should be able to also provide such a simple
 addon.
2021-01-03 01:55:01 +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 6e9824e6b0 Add better item name shortening. (Fixes #112) 2018-03-12 21:01:28 +01:00
Phoenix616 650d02e401 No need to log console message async (Fixes #101)
Iirc this was only async for database logging or name resolving. Neither of these is done anymore and async access of the Bukkit API can lead to strange problems like the CME described in the mentioned issue.
2018-01-22 01:00:24 +01:00
Phoenix616 a0505e995e Merge items in logger message 2018-01-03 17:28:31 +01:00
Phoenix616 2d45dcdac0 Get rid of expensive calls to Bukkit#getOfflinePlayer with a username
This changes events to store the database Account instead of an OfflinePlayer and deprecates any event method that uses/returns OfflinePlayer. This is necessary as Bukkit#getOfflinePlayer(String) queries Mojang for the UUID when the user was not found in the local cache. As we already store this information (name to UUID mapping) in our database we should not have no need to rely on querying Mojang. (This might make transactions fail for shop owners that haven't played before but that shouldn't really be an issue in most cases)
2017-10-29 23:50:24 +01:00
Andrzej Pomirski 2cde9da196 Remove DB logging 2015-05-22 13:26:28 +02:00
Andrzej Pomirski 1bbf293379 Fix nicknames 2014-06-29 22:22:28 +02:00
Andrzej Pomirski b37ae0fbc4 UUID changes 2014-04-12 14:22:34 +02:00
Acrobot bfad819a0a Remove unnecessary imports 2013-08-10 19:53:42 +02:00
Acrobot e1cb30a0e8 Add shop created/removed logging 2013-08-07 02:03:09 +02:00
Acrobot 42ca03b780 Send the transaction message in an async thread 2013-08-05 02:06:01 +02: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