Commit Graph

15 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 f0bf9a08ec
Add message to access and creative mode ignoring 2020-10-31 20:59:07 +01:00
Phoenix616 3c51f8ed87
Move more info to hover in shop messages to clean up chat
Also fix placeholders not working in not enough stock message
2020-06-28 23:00:45 +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 2075693e12 Add ability to send shop owner notifications via BungeeCord 2019-11-19 21:50:17 +01:00
Phoenix616 c028015d5e Improve /cstoggle by using UUIDs and HashSet instead of ArrayList 2019-09-14 23:49:40 +01:00
Phoenix616 b0523b2199 Add cooldown for empty/full shop owner notifications 2019-05-27 17:11:09 +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 836ef56864 Add more message placeholders (Fixes #159) 2018-08-23 22:10:24 +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
Phoenix616 0dea862cd0 Add full shop message, location and respect cstoggle
Inspired by @Brokkonaut's fork this adds a new NOT_ENOUGH_SPACE_IN_YOUR_SHOP message to send to the shop owner when someone tries to sell to his shop. It also adds new %world, %x, %y and %z variables to display the shop's location in the message, adds a config option to make both the full-shop and out-of-stock messages respect /cstoggle and makes values in the locale.yml support ampersand color codes.
2017-07-04 16:06:34 +01:00
Gabriele C 690af050e1 Style fix, removed useless cases 2015-08-06 14:33:15 +02:00
Gabriele C 8c49bfdbf4 Fixes 2015-08-01 09:52:13 +02:00
Andrzej Pomirski a4fdc30e17 Add an additional "%buyer" tag to the out of stock message 2014-08-13 17:23:11 +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