This fixes an issue where aliases would not show up in transaction
messages when the aliases item's string was shortened.
Also remove an unnecessary string length calculation from the
MaterialUtil getName method if there was no max width set.
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.
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
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...
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.
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.
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.
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.
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)