Commit Graph

106 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 4e40823d23
Fix ShowItem incompatibility as well as update adventure 2020-12-04 14:53:27 +01:00
Phoenix616 51e9d5f267
Use adventure text api in order to fix hover issues
This also has the side-effect of restoring CraftBukkit compatibility

Also move all libraries into a dedicated Libs package
2020-12-01 19:48:26 +01:00
Brice Frisco 8d98958c2d
Stock Counter (Resolves #365) (#368) 2020-10-30 22:45:16 +01:00
Phoenix616 5bc23214e0
Fix issue with items that have a single character in name (Fixes #339) 2020-07-08 21:40:06 +01:00
Phoenix616 742f838f09
Add support for component bungee messages
Requires at least BungeeCord commit a64c34d
2020-07-03 18:24:14 +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 183c724583 Improve Metrics and add /csmetrics command
This adds some more logging to the metrics for some interesting plugin
 settings as well as player account and transaction counts. This data
 about account count and average transaction and item counts is also
 exposed ingame via the /csmetrics command.

This also removes the outdated mcstats metrics as that site is long dead
 now, the last data is from two years ago...
2020-06-19 21:47:28 +01:00
Phoenix616 7fbf50cefe Allow 0 for a free shop (Resolves #297) 2020-05-06 20:38:41 +01:00
Phoenix616 432c505806 Add more information to /iteminfo command and make messages configurable 2020-05-03 15:05:24 +01:00
Phoenix616 781e017ae9 Add debug logging for configuration loading 2020-04-17 15:10:27 +01:00
Phoenix616 2426aef969 Add space at start of comments when writing config 2020-04-17 15:10:09 +01:00
Phoenix616 2a37304113 Specify locale when changing case (Fixes #291) 2020-01-29 16:35:04 +01:00
Phoenix616 4067427650 Add ability to define type of LWC protection in config 2020-01-15 22:55:40 +01:00
Phoenix616 bc680afcaf Slightly rework item comparison to fix legacy spawn eggs (Fixes #264) 2019-09-06 13:23:49 +01:00
Phoenix616 e972a7d657 Add further workarounds for comparing meta data (Fixes #250)
This is especially obvious for books where all the text will have color codes after dumping and loading them from the database. In order to be able to still compare to them we will load the item the item and then dump it again if it doesn't match the original one.
2019-07-08 18:05:50 +01:00
Phoenix616 4769ae2cf7 Allow loading of different numbers to BigDecimal (Fixes #225)
Also catch wrong types when loading the config better without completely disabling the plugin and revert "Make sure special parsers are setup" and register the parsers static again.
2019-05-03 21:08:56 +01:00
Phoenix616 c538f4a3dc Remove all usage of old MaterialData and other outdated code
This should make it more future-proof and possibly even work with 1.14 already.
2019-04-30 21:31:24 +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 53ae07b779 Fix error that prevented selling to admin shops 2019-04-07 13:47:18 +01:00
Phoenix616 1952e5cb46 Directly transfer items (Fixes #169) 2019-04-05 14:49:27 +01:00
Phoenix616 8cd89bf8ee Work around issue with serialising explorer maps
This is due to a bug in CraftBukkit not properly supporting localised/translatable display names when serialising item meta.
This also adds/improves the message when no valid item ID could be generated.
2019-03-19 19:08:53 +01:00
Phoenix616 91a372bd05 Make Item and Material parsing events 2019-01-17 19:50:47 +01:00
Phoenix616 fe85dafec5 Allow configuring what containers can be used for shops (Fixes #175) 2018-10-23 19:14:21 +01:00
Phoenix616 b5f77d67b5 Fix color of ShowItem insert bleeding into message 2018-10-23 19:02:09 +01:00
Phoenix616 0c6aaaa6f7 Fix damage not getting set properly 2018-09-10 01:11:42 +01:00
Phoenix616 adf5340932 Remove spaces from shortened strings for better readability
This is necessary due to the extended length of some material names in 1.13 as they directly include the variation into the material where previously only the data value was used. (E.g. BLACK_STAINED_GLASS_PANE) By removing the spaces and using uppercase characters to separate parts the string stays both readable to the user and parseable by the plugin. It should also be backwards compatible with the old format. (At least with 1.13 material names)
2018-09-10 00:33:27 +01:00
Phoenix616 e1998bcd7c Merge branch '1.12' into 1.13
# Conflicts:
#	src/main/java/com/Acrobot/Breeze/Utils/MaterialUtil.java
2018-09-10 00:31:26 +01:00
Phoenix616 12d2107ce1 Fix passing Material enum strings directly to getShortenedName 2018-09-10 00:25:25 +01:00
Phoenix616 173991ab4a Use spaces and proper casing for calculating width (Fixes #166)
This also slightly changes which name part gets shortened first. It will first shorten the longest name and then the rest.
2018-09-09 22:43:49 +01:00
Phoenix616 54b3b6966c Merge branch '1.12' into 1.13
# Conflicts:
#	src/main/java/com/Acrobot/Breeze/Utils/MaterialUtil.java
#	src/test/java/com/Acrobot/Breeze/Tests/MaterialTest.java
2018-09-09 14:47:32 +01:00
Phoenix616 516eefc5b6 Allow longer item names on signs by calculating the width
This uses hardcoded widths for the main characters used in Minecraft and might not be precise for some characters but better than the previous 15 char hard limit.
2018-09-09 14:37:09 +01:00
Phoenix616 5f0bbfff0c Merge branch '1.12' into 1.13 2018-08-29 21:29:52 +01:00
Phoenix616 dd4177e7cb Query server's player cache for missing players
This uses a cache for players that we haven't found before so to not check the cache too often and also checks if the online mode of the queried OfflinePlayer matches the server's mode (gotten from the first logged-in player in order to be compatible with BungeeCord requiring the server to be in offline-mode.
2018-08-29 21:29:27 +01:00
Phoenix616 640364e7e7 Actually return the block that the sign is attached to 2018-08-29 21:02:06 +01:00
Brokkonaut f5b3aa6b75 1.13 allows single chests besides each other. Handle that correctly. 2018-08-29 20:57:48 +01:00
Phoenix616 cf9e5bafde Merge branch '1.12' into 1.13 2018-08-23 22:12:58 +01:00
Phoenix616 836ef56864 Add more message placeholders (Fixes #159) 2018-08-23 22:10:24 +01:00
Phoenix616 89dcde83de Differentiate between wall and standing signs (Fixes #147) 2018-07-29 15:05:45 +01:00
Phoenix616 d4e39a3751 Make it compile with 1.13. No guarantees that it works without issues! 2018-07-26 00:13:06 +01:00
Phoenix616 247b2d239e Fix issues with alternative block materials forms
This also removes the number in the name from /iteminfo and the autocompletion
2018-06-18 20:04:17 +01:00
Phoenix616 c39720b449 Don't try to get the MaterialData from every damage (Fixes #131)
We will have to add a new way of handling that for 1.13 anyways when data isn't using damage values anymore.
2018-05-15 23:58:34 +01:00
Phoenix616 036d309965 [CI-SKIP] Fix some formatting inconsistencies
Remove spaces on empty lines and changed doc comment formatting
Also includes some minor comments and import fixes
2018-05-07 15:32:51 +01:00
Phoenix616 b3e62f199f Add option to set the worlds where shops should be removed (Fixes #129)
This also adds the ability to set string lists in the config.
2018-05-05 16:23:30 +01:00
Phoenix616 88bffc6fde Move comments in above config fields.
This should help avoid confusions as it matches the class' annotation layout and almost every other plugin does it like this.
2018-04-02 18:20:52 +01:00
Phoenix616 68ce9d56f6 Allow lowercase config keys too 2018-03-22 18:33:11 +01:00
Phoenix616 d28e44f377 Make sure to set the item if removed manually 2018-03-22 17:01:56 +01:00
Phoenix616 679000de15 Improve MaterialData handling
- Adds ability to shorten MaterialData type strings
- Removes Banner color string in name
2018-03-16 18:30:51 +01:00
Phoenix616 dd44217132 Fix issues with metadata IDs
Also log more info when the code couldn't be generated and send it to the sender when the iteminfo command is used
2018-03-16 18:24:52 +01:00
Phoenix616 51495cdefb Fix issues with banners and display their color
Also print more info when the code couldn't be generated.
2018-03-14 18:53:34 +01:00