Shopkeepers icon

Shopkeepers -----

Custom villager shopkeepers that trade exactly what you want them to trade!




v2.23.3 MC 1.21.4, 1.21.3, 1.21.1, 1.21, 1.20.6
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.21.4.
    • Add pale oak sign and hanging sign shops.
    • Add creaking to the by default enabled mob types.
  • Commands: Add command "/shopkeeper teleport [player] <shop> ['force']" that teleports a player near the specified shopkeeper.
    • Permissions: "shopkeeper.teleport" (default: op) and "shopkeeper.teleport.others" (default: op).
    • The command tries to find a safe teleport location in a small radius in front of the shopkeeper. The "force" argument can be used to teleport the player even if no safe location is found.
  • Commands: Improve the handling of ambiguous player names, shopkeeper names, and targeted shopkeepers.
  • Commands: Evaluate command argument fallbacks from front to back instead of from back to front. This results in better error messages since we usually prefer error messages for earlier arguments over error messages for later arguments. And this fixes an issue with for example the command "/shopkeeper list 123 2" being interpreted differently than "/shopkeeper list X 2": The latter previously resulted in an error rather then checking for shop owners named "X".
  • Fix: Prevent damage caused by shopkeeper mobs, e.g. when touching puffed pufferfish shopkeepers.
  • Fix: The remote command ignored shops that cannot be opened because they have no trades currently. We still want to show these shops in command completions.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Dec 9, 2024

v2.23.2 MC 1.21.3, 1.21.1, 1.21, 1.20.6
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Fix: Partially matching items were no longer accepted in trades.
    • The fix only applies to MC 1.21.1+. The previous behavior cannot be restored for server versions 1.20.5 - 1.21.
    • The partial matching only applies to item components as a whole now. Any data inside a component (including the "custom data" component used for plugin data) is always fully matched now due to the changes in Minecraft 1.20.5+.
  • Fix: Config sound effects fail to play on Spigot 1.21.3. Added a config migration from sound enum names to namespaced keys. This also resolves an issue with shift trading not working.
  • Add "no permission" message feedback when a user tries to edit a shopkeeper which they don't have access to.
  • Commands: In addition to the command permission itself, various commands require the player to have editing access for the involved shopkeeper now, and hide command completions for shopkeepers that the executing player has no access to. Affected commands:
    • edit (already required editing access before)
    • remote/open (already required trading access before)
    • remove
    • setForHire
    • setTradePerm
    • transfer (already required editing access before)
    • All snapshot commands.
  • Config: Add check-spawn-location-interaction-result (default: false). If enabled, players are only able to place shopkeepers in places where no other plugin denies them to interact with blocks.
    • We check for this by calling a dummy block interaction event for other plugins to react to.
    • If the spawn location is currently empty (i.e. of type air), we temporarily place a dummy block to get better interaction results from other plugins.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Nov 25, 2024

v2.23.1 MC 1.21.3, 1.21.1, 1.21, 1.20.6
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.21.3.
    • MC 1.21.2 was immediately replaced and is not supported.
    • Squids and dolphins support a baby variant now.
    • Salmons support size variants now.
    • Experimental features (creaking and pale oak sign shops) are not yet supported.
  • Fix: Error "IncompatibleClassChangeError: Found interface org.bukkit.craftbukkit.inventory.CraftMerchant, but class was expected" when a player shop becomes out of stock. This version is built against the latest version of Spigot 1.21.1 and might not be compatible with Spigot 1.21.1 builds from before 2024-09-07.
  • Add SQLite based trade log storage. (Thanks @akshualy)
    • In the future, this can be used for additional features, such as offline trade notifications.
    • Config: Add new setting `trade-log-storage`. Available values: `DISABLED` (default), `SQLITE` (recommended), `CSV`.
    • Config: Add migration from the old `log-trades-to-csv` to the new `trade-log-storage` setting.
    • Only one storage type can be selected: Logging trades to both CSV and the SQLite is not supported.
  • Config: Remove `file-encoding` setting: We use Bukkit to load the save data, which always expects the data to be UTF-8 encoded.
  • Fix: Remove shopkeepers from the spawn queue again when their chunk is unloaded. This can for example occasionally be observed during server startup on MC 1.21.1.
  • Fix: Player shops got deleted when their container is hit by a wind charge and `protect-containers` is disabled and `delete-shopkeeper-on-break-container` is enabled: We need to ignore explosions if they don't actually delete the affected blocks.
  • Fix: Allay shopkeepers were able to pick up items matching the item in their hand.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Nov 4, 2024

v2.23.0 MC 1.21.1, 1.21, 1.20.6
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.21.1.
  • Drop support for MC versions below 1.20.6 to update the plugin to use Java 21 and build against a more modern API version. If you want to run this plugin on an older server version, you need to use an older plugin version.
  • Item display name and lore data from the language file can be specified as Json text now. Other text does not yet support the Json format.
  • Fix: Color codes in text (e.g. from the language file) did not reset formatting.
  • Fix: Item data containing attribute modifiers was not correctly saved to the plugin config and failed to load.
  • Extend the item stack we use for server assumption tests to include newer item data.
  • Update the compatibility mode.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Aug 12, 2024

v2.22.3 MC 1.21, 1.20.6, 1.20.4, 1.20.2, 1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Fix: Compatibility with the latest versions of Spigot 1.21 (Thanks @DerMistkaefer).
    • Spigot 1.21 builds from before 2024-07-07 are not supported.
    • Spigot's `enum-compatibility-mode` is not supported, but also not required for this plugin.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jul 28, 2024

v2.22.2 MC (1.21,) 1.20.6, 1.20.4, 1.20.2, 1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5
Update: Some change in Spigot 1.21 broke this version of the Shopkeepers plugin. This version only works on Spigot versions from before 2024-07-06.

I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Add: Equipment editor for shopkeeper mobs and normal villagers.
    • The equipment editor can be opened from the shopkeeper editor, as well as from the editor for normal villagers. There is no equipment editor for Citizens NPC shopkeepers yet.
    • Players can also use placeholder items to setup the equipment items.
    • As before, to reduce the amount of entity combust events that we need to handle, we automatically apply a small (invisible) default head item for mobs that usually burn in sunlight. If a custom head item is configured inside the editor, the item from the editor is used instead. If the configured item is destructible, it is automatically made unbreakable to not break when exposed to the sunlight.
    • By default, the equipment can only be edited for mobs and slots that are known, at least for certain items, to visually affect the mob.
      • If the mob is not affected by any equipment, the editor option is omitted.
      • If a mob already provides dedicated editor buttons for certain equipment slots (e.g. horse armor, llama carpet), we omit these slots from the equipment editor.
      • Vindicators currently don't support the mainhand slot, because they only render the item when chasing a target, which is not the case for shopkeeper mobs.
    • Config: Add setting enable-all-equipment-editor-slots (default: false) that enables the equipment editor for all mobs and all equipment slots, regardless of which equipment slots the mob actually supports.
      • This can for example be useful for testing purposes.
      • If the mob provides dedicated editor options for certain equipment slots, any non-empty equipment configured in the equipment editor takes precedence.
    • Command: The /shopkeeper replaceAllWithVanillaVillagers command ignores the custom equipment for now, because vanilla villagers can end up dropping the equipped items, e.g. on death, which might not be intended.
    • Debug: Extend the /shopkeeper debugCreateShops command to accept an argument testEquipment: When specified, we spawn a shopkeeper for each enabled mob type and apply a default equipment. This can be useful to quickly test which equipment slots the individual mobs support.
  • Add: Configure the carried block of endermans by assigning an item to their mainhand in the equipment editor.
    • Only items with a corresponding block type result in a block to be carried by the enderman.
    • Players can also use placeholder items to specify the block type. This also allows players to use block types for which there doesn't exist a corresponding item (e.g. potted flowers).
    • Any block state data contained by the item (BlockStateTag / block_state component) is applied to the carried block. If the item is a placeholder item, any contained block state data is applied to the substituted block type.
    • Note: Some blocks do not properly render (e.g. player heads, signs, etc.).
  • Debug: The command /shopkeeper debugCreateShops spawns the shopkeepers now in the direction the player is facing.
  • Minor changes related to the trading shop editor. Players can now click a non-empty slot in their inventory to swap the item on the cursor.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jul 22, 2024

v2.22.1 MC (1.21,) 1.20.6, 1.20.4, 1.20.2, 1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5
Update: Some change in Spigot 1.21 broke this version of the Shopkeepers plugin. This version only works on Spigot versions from before 2024-07-06.

I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Fix: Since Spigot 1.20.5, snowman and mushroom cow shopkeepers failed to load because these mobs have been renamed to their Minecraft names ('SNOW_GOLEM' and 'MOOSHROOM').
    • When running on MC 1.20.5 or above, we automatically migrate these shop object types to their new names so that they load again.
    • Config: When updating to MC 1.20.5 or above, the old mob names in the `enabled-living-shops` setting might still work for now, but it is recommended to update them to their new names. We log a warning now should the old mob names no longer be recognized in the future.
    • Config: The default config was updated to use the new mob names. When running on an older server version, this results in a warning now, similar to the warnings that are logged for any default enabled mob types that are not supported by the server's Minecraft version.
    • Adjusted the shop object type aliases so that the `/shopkeeper` command recognizes both the old and new mob names.
  • Fix: In Shopkeepers v2.22.0, after a server upgrade, some shopkeepers failed to load with an error `Invalid trade offer 1: Failed to load property 'resultItem': Data is not of type ItemStack, but com.nisovin.shopkeepers.util.inventory.SKUnmodifiableItemStack!`.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jun 30, 2024

v2.22.0 for MC (1.21,) 1.20.6, 1.20.4, 1.20.2, 1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5
Update: Some change in Spigot 1.21 broke this version of the Shopkeepers plugin. This version only works on Spigot versions from before 2024-07-06.

I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Fix: Resolve a compatibility issue with Paper servers for MC 1.21.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jun 23, 2024

v2.21.0 for MC (1.21,) 1.20.6, 1.20.4, 1.20.2, 1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5
Update: Some change in Spigot 1.21 broke this version of the Shopkeepers plugin. This version only works on Spigot versions from before 2024-07-06.

I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.21. Add bogged and breeze to the by default enabled mob types.
  • Debug: Add additional debug output if one of the item related server assumption tests fails.
  • For developers: The Maven repository URL has changed (see Github readme). The old URL will still work for now, but consider updating to the new URL as soon as possible.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jun 18, 2024

v2.20.1 for MC 1.20.6, 1.20.4, 1.20.2, 1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Fix: Avoid adding empty item stacks to merchant recipes. This resolves a crash on Paper 1.20.6 servers.
  • Fix: The default config version is `6`. We previously applied a redundant migration from version 5 to 6 that did nothing.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, May 27, 2024

v2.20.0 for MC 1.20.6, 1.20.4, 1.20.2, 1.20.1, 1.19.4, 1.18.2, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.20.6:
    • MC 1.20.5 was replaced and is not supported.
    • Add wolf variants.
    • Placeholder items: Some potion and enchantments have been renamed in Bukkit to now match their Minecraft counterparts. If you used the Bukkit names in placeholder items, they might no longer get recognized and you need to update those items to use the Minecraft names instead. The "empty"/"uncraftable" potion is also no longer supported in placeholder items.
  • Drop support for MC 1.19, 1.19.2, and 1.19.3 to speed up build times. MC 1.19.4 is still supported and can be updated to without issues.
  • Add settings to identify the shop creation item by a custom NBT tag.
    • Previously, we identified shop creation items by matching their item data with the data specified in the shop-creation-item setting. Adding and identifying the shop creation item by a custom NBT tag instead has several benefits, such as being able to change the shop-creation-item in the future without breaking any existing shop creation items in the world (e.g. in chests, player inventories, trades, third-party plugin data, etc.). Also, in the past, we occasionally ran into issues when the server implementation made changes to how it creates the item based on the data specified inside the config.
    • These new settings are enabled by default for new configurations, but disabled when migrating from a previous Shopkeepers version in order to not break backwards compatibility for existing items.
    • Setting add-shop-creation-item-tag (default: true): Whether to add the tag to newly created shop creation items, e.g. when created via the /shopkeeper give command.
    • Setting identify-shop-creation-item-by-tag (default: true): Whether to identify the shop creation item by the tag.
      • This is a separate setting in order to help server owners with the migration process: Server owners can enable add-shop-creation-item-tag very early to already add the tag to all newly created shop creation items, but separately enable identify-shop-creation-item-by-tag later, once they expect or verified that the old shop creation item is no longer in use.
      • Unfortunately, the Shopkeepers plugin provides no built-in solution to automatically migrate all occurrences of the old shop creation item in the world or plugin data.
  • Change the default shop-creation-item display name to use json-based text.
    • Since somewhere around MC 1.20.4, display names with &-based color codes were no longer converted to a json text representation, but to legacy color codes. This caused some issues with existing shop creation items no longer getting recognized or stacking correctly. On some servers, these legacy color codes are in some circumstances later converted to json-based text, which causes similar issues with these shop-creation items suddenly no longer working after these conversions.
    • The default display name was changed to the compact '{"text":"Shopkeeper","italic":false,"color":"green"}'. This change is not automatically applied to existing configurations, because it could break existing shop creation items.
    • If you want to use a json-based display name that matches the previous representation on Spigot servers prior to MC 1.20.4, you can change the display name in the config to display-name: '{"extra":[{"bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false,"color":"green","text":"Shopkeeper"}],"text":""}'.
  • Fix: In v2.19.0, we added a workaround for a change in the Paper server to now force teleports of shopkeeper entities. However, on Spigot servers, we need to manually reset the forced teleport request again after the entity teleport, because we don't receive an EntityTeleportEvent there.
  • Fix: The angry state of wolves would previously get reset after some time (when the random AngerTime runs out). We now periodically re-apply it.
  • Debug: Add debug option text-components to log additional debug output whenever component-based text is sent.
  • Prepare for Paper's future removal of CraftBukkit's package relocation: Adjust the fallback compatibility mode to no longer try to parse the CraftBukkit version from the package name.
  • Fix: The entity argument for command editVillager no longer accepts non-villagers, shopkeepers, or Citizens NPCs.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, May 26, 2024

v2.19.0 for MC 1.20.4, 1.20.2, 1.20.1, 1.19.4, 1.19.3, 1.19.2, 1.19, 1.18.2, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Add support for MC 1.20.4. MC 1.20.3, which is mostly the same, is not officially supported. No new features or mobs. Experimental MC 1.21 mobs are not yet supported.
  • Add setting `citizen-npc-fluid-pushable` (default: `false`) to make all shopkeeper Citizens NPCs pushable by fluids (`true`), unpushable by fluids (`false`), or not modify their current behavior (`"undefined"`).
    • When set to `"undefined"`, the Citizens NPCs are not modified but retain their default or previously set fluid pushable behavior.
    • Unfortunately, the Citizens plugin has no in-game command yet to toggle the fluid pushable state of individual NPCs. But this is likely to be added in the future.
  • Shulker shopkeepers peek at nearby players now.
    • This behavior can be disabled with the setting `shulker-peek-if-player-nearby` (default: `true`).
    • The setting `shulker-peek-height` (default `0.3`) defines how much the shulker opens when it peeks.
  • Add: Support for setting up items that execute a command when being traded (either sold or bought).
    • Add: Command `/shopkeeper setTradedCommand <command>` (permission `shopkeeper.settradedcommand`, default `op`): Sets the command to execute when the held item is traded.
    • The command to execute is stored inside the item's data under the Bukkit key `shopkeepers:traded_command`.
    • When an item that has a traded command assigned is traded, the item is destroyed and the assigned command is executed as often as there are items in the item stack.
    • This feature is not meant to replace the requirement for custom third-party plugins or scripts in order to implement complex or custom behaviors. In order to reduce implementation and maintenance effort, only a single command can be assigned to an item and only a very limited set of placeholders is supported: `{player_name}`, `{player_uuid}`, `{player_displayname}`, `{shop_uuid}`.
      • Simple command sequences can also be defined via command aliases in Bukkit's "commands.yml" (see https://bukkit.fandom.com/wiki/Commands.yml).
      • If additional context information is required, e.g. about the shopkeeper's location or shop owner, a custom plugin that listens for the `ShopkeeperTradeEvent` might be better suited to implement the intended behavior.
  • Add: Utility command "/shopkeeper replaceAllWithVanillaVillagers".
    • This command deletes all shopkeepers and replaces them with corresponding vanilla villagers without AI that are configured very similar to villager shopkeepers.
    • This might for example be useful when migrating a world to vanilla Minecraft, e.g. when a server closes a world but wants to provide it as download to its players with all the shopkeepers included.
    • This command requires all of the following permissions: `shopkeeper.debug`, `shopkeeper.remove-all.player`, `shopkeeper.remove-all.admin`.
  • Add: "No shops were found" message to the "removeAll" command.
  • Fix: Moving shopkeepers did not update their location in the AI system, breaking gravity and AI activations when being moved out of their original chunk.
  • Fix: Verify that the Citizens API is still available before we try to use it. This guards against cases in which the Citizens plugin reports as "enabled", but the Citizens API is not in a properly initialized state. Reloading the Citizens plugin via PlugMan also seems to leave the Citizens API in an unusable state.
  • Fix: The check whether the cursor can hold the traded item was off by one, unnecessarily preventing trades in some cases.
  • Fix: Shopkeepers could no longer be moved after a recent change in the Paper server (PR 9937) to now also call the EntityTeleportEvent for plugin invoked teleports: All plugins that previously cancelled or modified entity teleports in certain cases (including the Shopkeepers plugin itself) can now accidentally cancel or modify plugin invoked entity teleports that were not supposed to be cancelled or modified previously. For now, we restore the previous behavior for all of our plugin triggered shopkeeper entity teleports by forcing these teleports, bypassing any cancellation and modification attempts of plugins.
  • API (breaking): Changes to the `ShopkeeperTradeEvent`.
    • The result item received by the trading player and the items received by the shopkeeper can now be altered via the `ShopkeeperTradeEvent` (`#get/setReceivedItem1/2`, `#get/setResultItem`).
      • Breaking: Plugins that use this event can no longer assume that the received items equal those of the trading recipe.
      • It is also possible to clear the received items. This might for example be useful when implementing items that apply alternative effects when traded (e.g. command items, or Vault integration).
      • Trade logging and trade notifications still log the original items of the trading recipe.
      • Some shopkeepers ignore changes to the received items in certain cases. For example, when removing items from a shop container or when adding or removing currency items to or from shop containers, the default shopkeepers will ignore any changes to the received items.
    • Since the received items can now be modified by plugins during the trade event, the event is called earlier now, prior to certain inventory related checks.
      • Breaking: Plugins can no longer assume that the trade will actually take place even if the trade event remains uncancelled.
    • Add a non-cancellable `ShopkeeperTradeCompletedEvent` that is called if the trade actually took place, after all trade effects have been applied.
    • Add `ShopkeeperTradeEvent#getTradeEffects` that allows custom `TradeEffect` instances to be added that are invoked when the trade is either aborted or completed.
      • This can be useful when implementing custom trade effects that are meant to only be executed once the trade is actually applied.
      • This might also be used for some of the built-in default trade effects in the future.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Dec 26, 2023

v2.18.0 for MC 1.20.2, 1.20.1, 1.19.4, 1.19.3, 1.19.2, 1.19, 1.18.2, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Add compatibility for MC 1.20.2.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Oct 10, 2023

v2.17.2 for MC 1.20.1, 1.19.4, 1.19.3, 1.19.2, 1.19, 1.18.2, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Fix: Incompatibility with Paper build 185+ (error "item migration failed") related to new ItemStack.isEmpty method
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Sep 18, 2023

v2.17.1 for MC 1.20.1, 1.19.4, 1.19.3, 1.19.2, 1.19, 1.18.2, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Change the icons of the sign type editor button of hanging sign shop objects from sign to hanging sign items.
  • Fix: Plugin not loading on server versions without MC 1.20 hanging sign materials: "The default value for property 'signType' is invalid: Unsupported hanging sign type: 'OAK'."
    • On those server versions, there is no valid default hanging sign type.
    • Disable the sign type validation on those server versions and adapt all code that previously expected the sign type to always provide valid hanging sign materials.
    • The hanging sign object type is now always disabled on server versions without MC 1.20 features.
  • Fix: Error "Invalid sign block face: DOWN" when trying to move a hanging sign shop object to the bottom of a block.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jun 29, 2023

v2.17.0 for MC 1.20.1, 1.19.4, 1.19.3, 1.19.2, 1.19, 1.18.2, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Add support for 1.20.1. MC 1.20 is not supported!
    • Add camel and sniffer to the by default enabled mob types.
    • Add bamboo and cherry sign types.
    • Add hanging sign shops:
      • This is a new shop object type similar to sign shops.
      • Required permission: `shopkeeper.hanging-sign` (default: `true`).
      • Config option: `enable-hanging-sign-shops` (default: `true`).
      • Limitation: Ceiling hanging signs always use the 'attached' state for now, instead of choosing this state dynamically based on the shape of the block above.
    • The sign text is now applied to both sides of shop signs, including sign posts, wall signs, hanging signs, and wall hanging signs.
  • Drop support for MC 1.18.1 and 1.19.1. These versions are only used by a few servers. Removing their support speeds up build times. MC 1.18.2 and 1.19.4 are still supported and can be updated to without issues.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jun 26, 2023

v2.16.5 for MC 1.19.4, 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.19.4.
  • Fix: When using `bypass-spawn-blocking`, we now compare spawn locations fuzzily.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Mar 21, 2023

v2.16.4 for MC 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.17.1, 1.16.5
This update contains a critical fix. It is highly recommended that you update as soon as possible!
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Fix: Immediately end the UI session if the GUI is not successfully opened (e.g. if another plugin cancels the corresponding InventoryOpenEvent).
  • Fix: Item duplication related to shopkeeper GUIs being opened while another GUI is already open.
  • Fix: Update for the latest breaking changes in the Citizens API related to metadata strings. This version of Shopkeepers is only compatible with the latest development version of Citizens!
  • Fix: The villager editor did not correctly translate hex color codes of the form "&#555555Test".
API:
  • Fix: "Shopkeeper#setName" did not correctly translate hex color codes of the form "&#555555Test". The result used the alternative "&" color code instead of Minecraft's "§" code.

Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jan 16, 2023

v2.16.3 for MC 1.19.3, 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.17.1, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.19.3. Experimental MC 1.20 features are not yet supported.
  • Drop support for MC 1.17 and MC 1.18. These versions are only used by a few servers. Removing their support speeds up build times by several minutes. MC 1.17.1, 1.18.2, and 1.18.1 are still supported and can be updated to without issues.
  • Increase the maximum name length limit from 128 to 256 characters.
    • This is especially useful for names that contain many hex color codes.
    • This does not affect the default name length limit defined inside the default config.
    • Also increase the name length limit of Citizens shopkeepers: The latest Citizens versions support names up to 256 characters long, regardless of the mob type.

Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Dec 8, 2022

v2.16.2 for MC 1.19.2, 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.19.2.

Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Aug 11, 2022

v2.16.1 for MC 1.19.1, 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.19.1.
  • Fix #809: Deleting a Citizens shopkeeper via the shopkeeper editor menu resulted in an error.
  • We log a warning now if another plugin deletes the shopkeeper while the ShopkeeperRemoveEvent is handled.
  • Config: Add setting "cancel-citizen-npc-interactions" (default "true").
    By default, we will now cancel interactions with Citizen shopkeeper NPCs, similar to how it is already the case for all the other types of shopkeeper objects. Not canceling the interaction with shopkeeper NPCs can result in some unintentional behaviors to take place (e.g. villager NPCs will increment the player's 'talked-to-villager' statistic).
    However, there may be cases in which server admins don't mind these additional interaction effects and actually want the normal NPC interaction behavior to take place in addition to the shopkeeper specific behavior, for example to still trigger attached NPC commands. These server admins have the option to revert to the previous behavior by disabling this setting.
  • Improve support for hex colors in translated messages and shopkeeper names.
    • We support both the Bukkit hex syntax ("&x&a&a&b&b&c&c") and the more compact hex syntax ("&#aabbcc") now. The Bukkit syntax already worked before for shopkeeper names and some texts, but is supported for more messages now.
    • When a player renames a shopkeeper using the compact hex syntax, the player's input is expanded to the Bukkit syntax due to compatibility reasons (Spigot only supports the expanded hex syntax in certain contexts). Validations like the shopkeeper name length limit are applied to the expanded syntax.
    • Note: In order for hex colored shopkeeper names to properly work in the trading UI, you need to use the latest Spigot 1.19 version or newer.
API changes, internal changes, and changes to the language files: See the complete changelog for details.

Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jul 31, 2022

v2.16.0 for MC 1.19, 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Update for MC 1.19.
    • Added the new MC 1.19 mobs to the by default enabled mobs. If you are updating, you will have to manually enable these mobs inside your config.
    • Added an editor option to switch between different frog variants.
    • Added editor options to toggle the left and right horns of goats.
    • Added the mangrove sign variant.
  • Fixed: When a currency item is changed via the "/shopkeeper setCurrency" command, we close all currently open player shopkeeper UIs now so that the change is immediately in effect.
  • We no longer forcefully spawn Citizens shopkeeper NPCs when we reload their NPC data (e.g. when we apply a shopkeeper snapshot). Instead, the NPC is spawned based on its stored spawn state and location.
  • Shulkers are now oriented according to the block face they are placed against. However, when the block they are attached to is broken, or they are attached to a non-full block face, or a block in the opposite direction would prevent them from opening, they can dynamically attach to another adjacent block.
  • Shulkers are no longer affected by gravity. However, if they are oriented to stand on top of a block, we still adjust their spawn location downwards by up to 1 block, as we do for any other mob even if gravity is disabled.
  • Added a new editor option to move shopkeepers.
    • Config: Added `move-item` (default: `ENDER_PEARL`).
    • Config: Moving of player shops can be disabled via the new `enable-moving-of-player-shops` setting (default: `true`).
    • Some default messages related to the validation of spawn locations were slightly changed to better fit when we move shopkeepers.
    • When right clicking a new shopkeeper location, we ignore interactions with certain types of blocks that are relevant for navigation, such as doors, trap doors, fence doors, buttons, levers, etc. Other types of interactable blocks (work benches, chests, signs, etc.) are not ignored, because we want shopkeepers to be placeable against those (even if some plugins may use them for navigation purposes, e.g. command signs).
    • It is also possible to move sign shopkeepers between their sign post and wall sign variant, or to change the orientation of shulker shopkeepers. However, it is not yet possible to change the sign or shulker orientation 'in place', i.e. without first moving the shopkeeper to another location.
    • Limitation: Moving Citizens shopkeepers silently fails if the Citizens plugin is not enabled currently.
  • Data: Removed various old data migrations:
    • Removed the importing from the old book offer data format (changed in late MC 1.14.4).
    • Removed the importing of pre MC 1.14 cat typed ocelot shopkeepers.
    • Removed the importing of pre MC 1.14 villager profession data.
    • Removed the 'unknown' owner name validation (no longer used since late 1.14.4). This conflicted with any player actually named 'unknown'.
  • Fixed: Striders no longer randomly spawn with a saddle.
  • The shopkeeper and villager editors try to restore the previously open page now when the deletion confirmation is cancelled.
  • Config: We no longer log a warning about invalid living entity types when we internally initialize the default config settings and are running on an older but supported MC version.
API changes, internal changes, and changes to the language files: See the complete changelog for details.

Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jun 20, 2022

v2.15.1 for MC 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Fixed: The refactors in version 2.15.0 broke the deletion of shopkeepers of inactive players.
v2.15.0 for MC 1.18.2, 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5
  • Added support for MC 1.18.2. Make sure that you are using the very latest build of Spigot 1.18.2, because initial builds of 1.18.2 had some chunk loading related issue that might affect the activation (spawning, ticking, etc.) of shopkeepers.
  • Dropped support for all Bukkit versions below 1.16.5 (1.14.4, 1.15.2, 1.16.1-1.16.4).
  • Bumped the Towny dependency to version 0.98.1.0 and using the glaremasters repository for it now (Jitpack seems to be having issues with Towny currently).
  • Config: The translations repository has been renamed and is now located at https://github.com/Shopkeepers/Language-Files.
  • Config: Added config option 'placeholder-item' that allows changing the placeholder item (Thanks to oltdaniel, PR #762). It is also possible to disable placeholder items now by setting the item to AIR.
  • Config: Changed the default placeholder item type from 'NAME_TAG', which is difficult to obtain in vanilla Minecraft, to 'PAPER'.
  • Config: Similar to Mohist servers, we also automatically enable the 'disable-inventory-verification' setting now when we detect that we run on a Magma server.
  • Added an editor option to toggle the saddle of horse shopkeepers on and off.
  • Data: The shopkeeper data version has changed from '1' to '2'.
  • Reduced the range at which shopkeeper mobs look at players from 12 to 6 blocks.
  • Command: The "/shopkeeper [shop-type] [object-type]" command no longer suggests completions for disabled shop and object types, or shop and object types for which the executing player does not have the usage permission.
  • Improvements related to the deletion of shopkeepers that are owned by inactive players:
    • We now log how many days ago the players were last seen when we delete their shops.
    • Fixed: If the plugin is reloaded, and the still pending asynchronous task that checks for inactive players is somehow taking longer than 10 seconds to complete, and the 'player-shopkeeper-inactive-days' setting is changed to '0' (i.e. disabled) during the reload, there was a chance for shop owners to be incorrectly considered 'inactive' and their shopkeepers deleted.
    • Related to that, this asynchronous task also aborts itself now when it detects that it has been cancelled, which happens when the plugin is disabled.
    • Fixed: When we delete the shops of an inactive player, we now ignore any shops that have already been removed for other reasons in the meantime.
  • We log a warning now whenever a shopkeeper mob has been removed due to the world's difficulty being set to peaceful. This warning is only logged once per affected shopkeeper and then skipped until the difficulty has changed.
  • It is no longer possible to create mob shopkeepers when they would not be able to spawn due to the difficulty being set to peaceful.
  • Improved the feedback messages that are sent when a shopkeeper cannot be created at a specific location: The previously used generic 'shop-create-fail' message was replaced with dedicated messages for the different reasons for why the shopkeeper cannot be created.
  • Config: Added setting 'invert-shop-type-and-object-type-selection' (default: 'false'), which allows to invert how the shop type and the shop object type are selected with the shop creation item. This might for example be useful for servers that disable all shop types but one.
  • Config: Added setting 'ignore-failed-server-assumption-tests' (default: 'false'), which allows to enable the plugin anyway, even when a server incompatibility has been detected during the initial server assumption tests.
  • Fixed: Citizens shopkeepers are able to move, teleport, and change their location while the Shopkeepers plugin is not running, or while the shopkeeper's chunk is not active currently. Previously, we only updated the shopkeeper's location during shopkeeper ticking, i.e. when the shopkeeper's chunk has been activated. However, if the NPC was moved to a different chunk (or even world), and the shopkeeper's previous chunk has never been activated since then, the spawned NPC might no longer have been recognized as a shopkeeper. One noticeable effect of this was that the NPC could no longer be interacted with. This has been fixed by also updating the shopkeeper's location in various other circumstances now.
  • Fixed: A related but more minor issue has been that Citizens NPCs can already be spawned while their chunk is still pending to be activated by the Shopkeepers plugin. During this short time period (roughly one second after chunk loads), the Citizens NPCs were not yet recognized as shopkeepers. This has been fixed by separating the registration of ticking (i.e. active) shopkeepers from the registration of spawned shop objects: Citizens shopkeepers now register their NPC entity already before the chunk is activated.
  • Fixed: We no longer attempt to save the data of Citizens shopkeeper NPCs when the corresponding NPC has not yet been created (i.e. when no NPC has been attached to the shopkeeper yet).
  • Fixed: Updating a shopkeeper's location also updates the shopkeeper's activation state now. Previously, it was possible for a shopkeeper's new chunk to not get activated until the chunk is reloaded.
  • Command: Added command "/shopkeeper setCurrency ['low'|'high']", which allows you to change the currency item(s) from in-game.
  • Permission: Added permission 'shopkeeper.setcurrency' (default: 'op') which provides access to the new set-currency command.
  • Fixed: When setting the zero currency item to AIR, the selling and book shopkeepers were not able to derive the price of a trade from the editor when only the high currency price is specified.
  • Added placeholder items for empty trade slots inside the editors of player shops.
    • Config: Added various settings to specify the editor placeholder items for empty slots of partially set up trades (default: barriers, as it has been the case before), as well as for completely empty trade columns (default: gray stained glass panes).
    • When you disable the high currency inside the config (by setting it to AIR), you will now need to manually adjust the corresponding empty placeholder items for the affected high currency slots (for example by setting them to AIR). This is a compromise that allows these slots to be set to arbitrary items, even if the high currency is disabled.
    • Added display names and lore to these placeholder items that explain their purpose and usage inside the editor.
    • Config: The settings for the zero currency items are no longer used (they have been replaced with new settings) and are automatically removed during a config migration.
    • The "checkItem" command no longer compares the held items with the zero currency / editor placeholder items.
  • Config: Bumped the config version to 5.
  • Command: The "give" and "giveCurrency" commands no longer allow item amounts greater than 1024. Previously, these commands silently truncated any amounts greater than 1024.
  • Command: The "giveCurrency" and "setCurrency" commands refer to the low currency as 'base' currency now.
  • Command: Different types of command executors (e.g. command blocks and the console) no longer share their pending confirmation state.
  • Command: Confirmations account for proxied command senders now: Since the original caller of the command receives the command's feedback messages, we also require confirmation from the original caller.
  • Fixed: When removing or translating color codes in text we also account for Bukkit's hex color code now (x).
API changes, internal changes, and changes to the language files: See the complete changelog for details.

Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Apr 10, 2022

v2.14.0 for MC 1.18.1, 1.18, 1.17.1, 1.17, 1.16.5, 1.15.2, 1.14.4
I only list the primary changes here. For information on API changes, internal changes, and changes to the language files, you can find the complete changelog on Github: https://github.com/Shopkeepers/Shopkeepers/blob/master/CHANGELOG.md
  • Updated for MC 1.18 and MC 1.18.1.
  • Updated the 'compatibility mode' implementation, which broke with the Miecraft 1.18 update. However, due to some server internal mapping changes, it is likely that this compatibility mode will break again in future updates.
  • Added the option for admins to create and restore snapshots of shopkeepers.
    • Each snapshot captures the shopkeeper's dynamic state (i.e. its trades, shop object configuration, etc.), a timestamp, and is associated with a unique name that is provided when the snapshot is created.
    • The name can currently be at most 64 characters long and not contain any color codes.
    • This feature is currently meant to only be used by admins and third-party plugins. Shop owners are not yet able to create and restore snapshots of their own shops.
    • The shopkeeper data of snapshots is automatically migrated during plugin startup, just like the shopkeeper's normal data.
    • Shopkeeper snapshots are currently expected to be used sparsely. In order to guard against the unnoticed creation of excessive amounts of snapshots, we log a warning whenever a shopkeeper has more than 10 snapshots.
    • When formatting the timestamp of a snapshot for display, we currently use the server's default time zone. There is no option in Shopkeepers yet to use a different timezone. If you want to use a different timezone for formatting the timestamps, you can change your server's default timezone via the JVM command line argument '-Duser.timezone=America/New_York' when you start your server.
    • Command: Added commands '/shopkeeper snapshot [list|create|remove|restore]' to manage shopkeeper snapshots.
    • Permission: Added permission 'shopkeeper.snapshot' (default: 'op') that provides access to the new snapshot commands.
    • Experimental: It is also possible to capture and restore the NPC state of Citizens NPC shopkeepers.
      • Config: Added setting 'snapshots-save-citizen-npc-data' (default: 'true') that controls whether shopkeeper snapshots capture and restore Citizens NPC data.
      • When this setting is disabled, the Shopkeepers plugin automatically deletes all previously saved NPC data again.
      • Capturing the data of a Citizens NPC will not work if the NPC is not available at the time the snapshot is created (e.g. if the Citizens plugin is not running currently).
      • If the Citizens NPC is not available when a snapshot is restored, the shopkeeper remembers the NPC data until the NPC becomes available again and the stored NPC state can be applied. If another snapshot is restored in the meantime that does not store any NPC data, we retain the previously restored but not yet applied NPC state.
  • Added editor options to change the puff state of puffer fish, as well as the pattern and colors of tropical fish.
  • Added sound effects when a trade succeeds or fails.
    • Config: These sound effects can be changed or disabled (by setting their volume to zero) via the new config settings 'trade-succeeded-sound' and 'trade-failed-sound'.
  • Added settings to simulate the trading sounds of vanilla villagers and wandering traders.
    • Config: Added setting 'simulate-villager-trading-sounds' (default: 'true').
    • Config: Added setting 'simulate-villager-ambient-sounds' (default: 'false').
    • Config: Added setting 'simulate-wandering-trader-trading-sounds' (default: 'true').
    • Config: Added setting 'simulate-wandering-trader-ambient-sounds' (default: 'false').
    • Config: Added setting 'simulate-villager-trading-sounds-only-for-the-trading-player' (default: 'true').
    • By default, we now simulate the trading sounds of villagers and wandering traders for the trading player. These sounds are only played if the trading player is in the vicinity of the shopkeeper. Trading remotely will not play these sounds.
    • Debug: Debug output for these simulated villager sounds can be enabled via the existing debug option 'regular-tick-activities'.
  • Shopkeepers store the yaw angle now with which they are initially spawned.
    • When placing a shopkeeper on top of a block, the yaw angle is chosen so that the shopkeeper faces towards the player who is creating the shopkeeper. When placing a shopkeeper against the side of a block, the shopkeeper is rotated according to the direction of the targeted block side.
    • Existing shopkeepers will have a yaw of 0, i.e. they face south just like before. In the future, it will be possible to reposition shopkeepers and thereby also adjust the yaw of already existing shopkeepers. But this is not yet available.
    • Data: Sign shopkeepers no longer store their sign facing. Instead, this facing is now derived from the shopkeeper's yaw. Existing sign shops will automatically migrate their currently stored sign facing to the shopkeeper's yaw.
    • Shopkeeper mobs will rotate back to their initial direction now when there is no player to look at. However, this requires a player to still be somewhat nearby, since we only tick shopkeeper mobs when players are nearby.
  • Config: Added setting 'set-citizen-npc-owner-of-player-shops' (default: 'false').
    • When enabled, we set the Citizens NPC owner of player-owned NPC shopkeepers. When disabled, we automatically remove any previously set Citizens NPC owners from those player-owned NPC shopkeepers again.
    • By enabling this setting, and configuring the Citizens command permissions for your players accordingly, you can allow shop owners to use the commands of the Citizens plugin to edit the Citizens NPCs of their NPC shopkeepers.
  • Fixed: Wandering traders and trader llama shopkeepers despawned roughly every 40 minutes due to Minecraft's despawning timer still being active for these mobs, even when their AI is disabled. However, this issue has been rather minor, because the affected shopkeepers automatically respawned a few seconds afterwards. This issue has now been fixed by setting the 'DespawnDelay' of wandering traders to '0' and marking trader llamas as 'tamed', which disables Minecraft's despawning timer for these mobs.
  • Fixed: We were not able to detect item stack deserialization issues, because Bukkit only logs an error in this case instead of throwing an exception. This also resulted in the loss of shopkeeper data when someone tried to revert from one server version to an older one, because the loading of item stacks that were saved on a newer server version is not supported by Bukkit. We are now able to detect these deserialization issues and then shut down the plugin before any data is lost.
  • Fixed: Shopkeepers could lose some of their trades during item migrations. When an item was migrated, but the subsequent trades did not require any item migrations, these subsequent trades were lost. However, it was relatively unlikely to encounter this issue in practice. An exception to this is in combination with the following Paper-specific issue that only affects trades with certain enchanted book items.
  • Fixed: On Paper servers, the comparisons of enchanted book items with multiple stored enchantments were not working as expected. The issue was caused by the server reordering the stored enchantments in some cases, as well as Paper automatically converting any deserialized Bukkit item stacks to CraftItemStacks, which behave differently when being compared to other CraftItemStacks. One known effect of this was that the above issue of trades potentially being lost due to item migrations would be encountered more likely on Paper servers, because the reordering of these stored enchantments would be detected as an 'item migration' by the Shopkeepers plugin. It also caused an unnecessary save of all shopkeeper data after every plugin reload.
  • Fixed: The "/shopkeeper removeAll" command always tried to remove all player shops, instead of only the shops of the executing player.
  • Data: Various kinds of invalid shopkeeper data and failed data migrations that have previously been ignored or only triggered a warning are now checked for and will prevent the shopkeeper from loading. Most notably, this includes the data of shopkeeper offers, and the hire cost item of player shops. Previously, this invalid data would be cleared. Now, it is retained for a server admin to investigate the issue.
  • Data: It is invalid now to mix legacy and non-legacy book offer data (changed during late MC 1.14.4).
  • When shopkeepers of inactive players are removed, we now trigger an immediate save, even if the 'save-instantly' setting is disabled.
  • Versioning: Snapshot builds will now include the Git hash in their plugin version.
  • Debug: The 'shopkeeper-activation' debug option will now log additional details about every single shopkeeper activation and deactivation, instead of only logging a summary about how many shopkeepers were activated per chunk.
  • Various minor changes to error and debug log messages:
    • Some error and debug log messages have slightly changed.
    • Log messages involving a specific shopkeeper are more consistently formatted now.
    • Some groups of error messages are now logged as a single message.
    • In a few remaining cases, stack traces are no longer printed directly to the server log, but through the plugin logger.
  • During the initial plugin startup, we now test if the server meets certain basic assumptions about its API implementation. In order to prevent damage due to unexpected server and plugin behavior, the plugin shuts itself down if any of these assumptions turn out to be incorrect. These tests are meant to be lightweight, but may be expanded in the future.
  • Debug: Added a debug log message whenever a player tries to set an invalid shop name.
  • Debug: Added a debug log message when the creation of a Citizens NPC fails.
  • Data: Removed various 3 year old data migrations:
    • We no longer check for and remove entity uuids from the data of living entity shopkeepers.
    • The object data of shopkeepers is expected to be located in its own dedicated 'object' section.
    • The stored object type identifiers of shopkeepers are expected to perfectly match the registered shop object types. They are no longer normalized and fuzzy matched.
  • Data: We no longer generate a new unique id if the shopkeeper data is missing the shopkeeper's unique id. Instead, the loading of the shopkeeper fails now in this case.
  • Data: All item stacks are now (shallow) copied before they are saved to the shopkeeper data. This prevents SnakeYaml from representing the item stacks using anchors and aliases (a Yaml feature) inside the shopkeepers save file if the same item stack instances would otherwise be saved multiple times in different contexts.
  • Command: For consistency among commands, and to avoid certain ambiguous command parsing cases, the "edit", "remote", and "remove" commands no longer merge trailing arguments to derive the target shopkeeper name. It is still possible to target shopkeepers with names that consist of multiple words by using a dash as word separator instead of a space.
  • Command: Shopkeeper and entity command arguments now propose the ids of targeted shopkeepers and entities.
  • Fixed: The "testSpawn" debug command would respawn the shopkeepers in the executing player's chunk, but would not immediately update their object id registrations. The shop objects will now automatically and immediately inform the shopkeeper registry about those object id changes.
  • Fixed: When changing the container location of a player shop via the API, the protection for the previous container was not properly disabled.
  • Fixed: Any code that retrieves the container block of a player shopkeeper accounts now for the fact that the block might be null. This was only really an issue when another plugin invokes internal operations that require the container block to be available in a situation in which it might not be available currently.
  • Fixed: The order of the enabled living shop object types was not updated on plugin reloads based on their order inside the config.
  • Debug: Removed the debug option 'capabilities' again. We already always log whether server version specific features are enabled. This also resolves an internal issue related to whether the config has already been loaded at the time this debug option is checked.
  • Fixed: In order to resolve compatibility issues with plugins that modify chat messages at lowest event priority, we now enforce that our chat input event handler always executes first. This should resolve compatibility issues with shopkeeper names not being considered valid, because some other plugin injected color codes into the player's chat message before we were able to process it.
  • Fixed: Since Bukkit 1.16.5, the data version was no longer guaranteed to be the first entry of the save file, and the log message for the number of loaded shopkeepers has been off by one if the save file did not contain any data version yet.
  • Fixed: We now check if the UI session is still valid before handling an inventory event at the HIGH event priority. Previously, the UI session was simply expected to still be valid. But this assumption can be violated by plugins that (incorrectly per API documentation) close the inventory during the handling of an inventory event.
  • Fixed: Sound effects played to players would sometimes appear to be played slightly to the left or the right of the player's head.
  • Fixed: When a NPC player shopkeeper moved to a different world, its container location (which is currently expected to always be located in the same world as the shopkeeper) and the protection of the container were not getting updated.
  • Data: Under certain circumstances, one of the publicly posted snapshots of this update accidentally saved shopkeeper ids as normal attributes into the save file. The save file data version was bumped from 2 to 3, so that any previously saved shopkeeper ids are automatically removed again.
  • Data: Improved the detection of server and plugin downgrades.
    • We now use the data version that is stored inside the Shopkeepers save file to detect Minecraft server and Shopkeepers plugin downgrades. When a downgrade is detected, we log an error and disable the plugin to prevent any potential loss of data.
    • There is one minor issue with this: After server downgrades, Spigot fails to load item stacks that are stored inside the save file. This causes the loading of the save file to fail before we are able to extract the data version. Our own Minecraft server downgrade check will therefore usually not actually be reached. However, the plugin will disable itself in this situation anyway. But the error message will then be different and more verbose. It should, however, also mention that the server downgrade is the issue.
    • In order to be able to more reliably detect downgrades of the Shopkeepers plugin that might affect the saved shopkeeper data, we added a new 'shopkeeper data version' component to the data version that is stored inside the save file. The previous 'shopkeeper storage version' was, and still is, used for changes that require a save of all shopkeepers, such as for example when the storage format has changed. The new shopkeeper data version, however, is meant to be incremented more frequently, namely after every change to the data format of shopkeepers and shop objects. Usually, these changes only affect a subset of the shopkeepers and shop objects, so no full save of all shopkeepers is required when this data version component has changed.
    • These shopkeeper and shop object data format changes also include the addition of new shopkeeper or shop object attributes: Since older plugin versions are not aware of these new attributes, the data for these attributes can get lost when an older plugin version would be allowed to load and later save shopkeepers that previously contained data for these attributes.
API changes, internal changes, and changes to the language files: See the complete changelog for details.

Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Dec 19, 2021

v2.13.3 for MC 1.17.1, 1.17, 1.16.5, 1.15.2, 1.14.4
Be sure to read the changelog of v2.13.0 first: https://www.spigotmc.org/resources/shopkeepers.80756/update?update=409018
  • Fixed: The 'style' property of horse shopkeepers was not getting saved anymore since v2.13.0 and caused migration warnings whenever the plugin attempted to load or save it. If you already upgraded, and don't have a backup of your save.yml file available, or don't want to revert to the backup's state, you may have to freshly edit the 'style' of your horse shopkeepers again.
  • Fixed: There is an open Spigot 1.17 issue that sometimes causes the plugin to assume that it failed to spawn shopkeepers during chunk loads. In v2.13.1, we already turned a warning message related to this into a debug message in order to not spam the server log with warnings. But another message was missed and has now been turned into a debug message as well.
Known potential issues: See here.

Donations

If you like this plugin, consider making a donation.

Thanks!
----------, Jul 11, 2021

v2.13.2 for MC 1.17.1, 1.17, 1.16.5, 1.15.2, 1.14.4
Be sure to read the changelog of v2.13.0 first: https://www.spigotmc.org/resources/shopkeepers.80756/update?update=409018
  • Updated for MC 1.17.1
  • Building: Bumped the CraftBukkit dependencies for the 1_16_R2 and 1_16_R3 versions of Shopkeepers from 1.16.2-R0.1 and 1.16.4-R0.1 to 1.16.3-R0.1 and 1.16.5-R0.1 respectively. This has no effect on the server versions the plugin works on, but simplifies testing.
  • Internal: We now use the server's mappings version to check if the plugin is compatible.
    • Previously, we used CraftBukkit's 'Minecraft Version' to determine compatibility (eg. '1_16_R3' for 1.16.5). However, Spigot will occasionally update its mappings without bumping the CraftBukkit version or this 'Minecraft Version'. With the new remapping of NMS code since 1.17, these mappings changes will forcefully break our compiled NMS code and then require an update (or at least a rebuild) of the Shopkeepers plugin.
    • Previously, these mappings changes would result in errors during plugin startup, instead of being detected as an incompatible server version. We now keep track of all supported mappings versions and use the server's mappings version to determine whether we can support it and which NMS module we need to load.
    • For some of the 1.16 versions of the plugin, multiple mappings versions are mapped to the same NMS module. However, this should not be a problem, because these modules do not make use of the new remapping build feature, and are therefore less likely to actually break on mappings changes (there are no known server incompatibility issues for these versions).
    • Another effect of the mappings versions being changed without there necessarily being a CraftBukkit version bump: Since our NMS modules build against specific CraftBukkit versions instead of mappings versions, we can only support the latest mappings version for every CraftBukkit version.
    • Building: Added test cases to ensure that our NMS modules build against CraftBukkit versions with the expected mappings versions.
    • Also, our NMS module versions no longer have to match CraftBukkit's 'Minecraft Version'. In order to be able to support different mappings versions even if Spigot does not bump its 'Minecraft Version' (as it was the case in the 1.17 to 1.17.1 update), we will now derive a new NMS module version by incrementing the revision number ourselves.
  • Fixed: The compatibility mode when running on an unsupported server version was no longer working.
  • If the compatibility mode fails to enable, we now log an error that should provide additional information about the issue.
  • Fixed: When the compatibility mode failed to enable, we would encounter an error during plugin disable due to the TradeLoggers component not having been enabled yet.
  • Bumped Citizens dependency to v2.0.28.
  • Config: Added setting 'save-citizen-npcs-instantly' (disabled by default), which triggers a save of all Citizens NPC data whenever the Shopkeepers plugin modifies a Citizens NPC. Saving the Citizens NPCs is quite a heavy operation. Since the Citizens API does not yet provide an API to trigger an asynchronous save, we trigger the asynchronous save by invoking the "/citizens save -a" command in the console. As a side effect, this will print command feedback in the console whenever the NPCs are saved this way.
  • Fixed: Since v2.13.0, when not using the 'always-show-nameplates' setting (i.e. the default case), the nameplates of Citizens player NPC shopkeepers were limited to a length of 16 and would otherwise not be displayed. The issue is that the Citizens 'hover' nameplate option does not work well for player NPCs. If you are upgrading and have issues with nameplates of previously created NPCs not showing, either use the shopkeeper editor to rename the NPC, or use the "/npc name" command to toggle the nameplate visibility.
  • We no longer open the trading interface if the shopkeeper has no offers. If the player can edit the shopkeeper, we print instructions on how to open the editor. This may also resolve an incompatibility with Bedrock players when using GeyserMC.
  • Fixed: Writing files (such as when saving the shopkeepers data) failed on some servers due to the SecurityManager implementation blindly denying the execute permission without differentiating between files and directories. We check the execute (i.e. access) permission for directories in which we want to write files in order to provide more meaningful error messages in cases in which missing directory permissions prevent us from writing files. However, this intervention of the SecurityManager should have no effect on whether or not we can actually write to a directory, so we can safely ignore it.
  • API: Added Shopkeeper#hasTradingRecipes(Player).
  • API: The type parameters of TypeRegistry#registerAll and #getRegisteredTypes were changed to be less specific.
  • Debug: When we print ItemStacks in YAML representation to the server console, we omit the trailing newline now. However, the "/shopkeeper yaml" command still sends additional empty lines in chat to make the output more readable.
  • Debug: Added debug option 'empty-trades' that logs item information for the selected trading recipe and the input items whenever a player clicks an empty trading result slot.
  • Internal: We avoid copying item stacks in a few more cases.
  • Internal: Renamed MerchantUtils#getSelectedTradingRecipe() to #getActiveTradingRecipe() and adjusted a few related debug messages.
  • Internal: Various refactors related to the default UIs, time unit conversions, and utilities in general.
Added messages:
  • cannot-trade-no-offers
  • no-offers-open-editor-description
Known potential issues: See here.

Donations

If you like this plugin, consider making a donation.

Thanks!
----------, Jul 8, 2021

v2.13.1 for MC 1.17, 1.16.5, 1.15.2, 1.14.4
Be sure to read the changelog of v2.13.0 first: https://www.spigotmc.org/resources/shopkeepers.80756/update?update=409018

Changes in this revision:
  • Fixed: Added a temporary workaround for an open server issue that caused shopkeeper entities to duplicate on MC 1.17. The warning that was printed about the spawning of shopkeeper entities apparently failing has been turned into a debug message for now. Shopkeeper entities may sometimes take a few second to spawn currently.
  • Config: We automatically enable the 'disable-inventory-verification' setting now when we detect that we run on a Mohist server.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jun 27, 2021

v2.13.0 for MC 1.17, 1.16.5, 1.15.2, 1.14.4
This update is rather large. I therefore only summarize the most important changes here. You can find the complete changelog in the Github repository.

This update has not yet been tested much on MC 1.17, which itself is probably not yet stable. Also, some of the other changes of this update bear the risk to introduce new bugs. This is why this version is initially considered to be in 'alpha' state. I will promote this version to 'release' state as soon as more time has gone by and no major issues have been identified. If you are upgrading to this version, be sure to create a backup of your server and shopkeepers data!

Update for MC 1.17:
  • Added axolotls, glow squids, and goats to the by default enabled mob types. If you are upgrading, you will have to manually enable these new mob types.
  • Added new editor features that are only available when using MC 1.17:
    • Changing the axolotl variant.
    • Toggling between a glowing and a dark glow squid.
    • Toggling between a normal and a screaming goat. This editor option is only available if 'silence-living-shop-entities' is disabled.
    • Toggle glowing text for sign shops.
  • Known issues related to MC 1.17:
    • Squids and glow squids can be pushed around. This issue might already have existed for some time. See https://bugs.mojang.com/browse/MC-89883
    • The loading of entities is deferred from chunk loading in Minecraft now. I am not yet sure if this severely impacts the Shopkeepers plugin, but it certainly partially breaks the 'block-villager-spawns' and 'block-wandering-trader-spawns' settings currently. It is not yet clear how Spigot will update to account for this in order to retain backwards compatibility for plugins.
Migration notes:
  • The folder structure has changed:
    • The save file is stored inside a new 'data' folder now. If no save file exists at the new location and a previous save file is found at the old location, it is automatically moved.
    • Language files are located inside a new 'lang' folder now. Existing custom language files need to be manually moved!
    • Trading logs (if enabled) are stored inside the folder 'trade-logs' now. Existing logs are not automatically moved to the new location!
  • Removed the 1.16 'PIG_ZOMBIE' migration. We no longer automatically remove this mob type from the config, but only log a warning and then ignore it.
  • Removed the migration from Citizens shopkeeper NPC ids to NPC unique ids (originally added in v2.4.0).
  • The setting 'enable-spawn-verifier' is no longer used and is automatically removed from existing configs during the update.
  • The data format of the CSV trade logs has changed. If you automatically process these CSV trade logs, you may have to update your programs to account for the new format.
  • The permissions for the shopkeeper remove (all) command have been renamed. You may have to update your permissions setup.
    • 'shopkeeper.remove.own' -> 'shopkeeper.remove-all.own'
    • 'shopkeeper.remove.others' -> 'shopkeeper.remove-all.others'
    • 'shopkeeper.remove.all' -> 'shopkeeper.remove-all.player'
    • 'shopkeeper.remove.admin' -> 'shopkeeper.remove-all.admin'
Language file changes:
  • The default messages are no longer stored inside the config. Instead, we always generate an 'en-default' language file. This file acts as a template for custom language files. It is not meant to be modified and is replaced with an up-to-date version on every plugin startup. Message keys no longer start with the 'msg' prefix.
  • Config: Changed the default language from 'en' to 'en-default'. Existing configurations are automatically migrated.
  • Some texts that were previously settings in the config are now regular messages, such as the inventory titles, nameplate prefix, and sign shop lines. The appearance of sign shops has slightly changed.
  • Added warnings when the language file is missing messages or contains unexpected messages.
  • Fixed: Color codes for default messages were not getting replaced. This has an effect when some messages of the specified language file cannot be loaded.
  • When splitting messages into multiple lines, we take all Unicode line break characters into account now.
  • Fixed: The default german translation was missing some translations.
  • Several messages were changed, renamed, removed, or added. See the complete changelog for details. You will have to manually update your custom language files to adapt to these changes.
New feature: Placeholder items for player shops.
  • See: https://github.com/Shopkeepers/Shopkeepers-Wiki/wiki/Placeholder-Items
  • When players set up the trades of their shopkeepers, they can now use renamed nametag items as substitutes for items that they don't have. The nametag's display name has to match the name of the substituted item type. Display names that don't match any english item type name won't work. Other properties of the substituted item cannot be specified.
  • The parsing is lenient to some extent: The Minecraft namespace prefix ('minecraft:') is optional (some item type names are even too long to be used in anvils if the prefix is included). The upper and lower case of characters is not important. Leading and trailing whitespace is ignored. Spaces and dashes are converted to underscores. Any color codes are also ignored.
  • Placeholder items are immediately converted to their substituted item inside the shopkeeper editor. If what appears to be a placeholder item is not converted, its display name probably does not match a known item type. It is not possible to setup player shopkeeper trades that buy or sell the placeholder items themselves. But normal nametags, and nametags whose names do not match any valid item type, are treated like normal items and can be traded as usual.
  • Placeholder items are supported by the selling, buying, and trading player shopkeeper. The admin shopkeeper treats them like normal items.
  • Placeholder items can not only be used for items that are bought, but also for items that are sold. This allows players to setup trades before they have the items required to fulfill these trades.
  • It is also possible to specify basic enchanted books via placeholder items:
    • The used naming format is '<enchantment> <level>'.
    • The parsing is similar to that of item type names: The normalized display name has to match the id of the intended enchantment.
    • Aliases have been defined for some of the enchantments, so that for example 'curse of binding' is correctly mapped to the enchantment with id 'binding_curse'.
    • Only a single enchantment can be specified.
    • The level can be freely specified, even outside the range of enchantment levels that can usually be obtained in vanilla Minecraft. Levels outside the range of shorts are truncated to the nearest valid short number. If no level is specified, or if the level cannot be parsed, the enchantment's minimum level is used (usually 1).
    • Up to level ten, the level can also be specified via roman numerals ('I' to 'X'). It is also possible to specify the levels 'min' or 'max', which results in the normal minimum or maximum level of the specified enchantment to be used.
  • It is also possible to specify basic potions, splash potions, lingering potions, and tipped arrows via placeholder items:
    • The used naming formats are:
      • Potion: '[long] [strong] [potion] [of] [long] [strong] <potion type> [2|ii] [potion] [2|ii]'
      • Splash potion: '[long] [strong] <splash> [potion] [of] [long] [strong] <potion type> [2|ii] <splash> [potion] [2|ii]'
      • Lingering potion: '[long] [strong] <lingering> [potion] [of] [long] [strong] <potion type> [2|ii] <lingering> [potion] [2|ii]'
      • Tipped arrow: '[long] [strong] [tipped] [potion] <arrow> [of] [long] [strong] <potion type> [2|ii] [tipped] [potion] <arrow> [2|ii]'
    • The parsing of the potion type is similar to that of enchantments: The normalized 'potion type' has to match the id of the intended potion type. These potion types cover the potions that are found inside the creative inventory. Custom potion items with arbitrary effects and properties are not supported.
    • The keywords 'splash', 'lingering', and 'arrow' are used to identify the different item types. If none of these keywords is found, a normal potion item is assumed.
    • The keywords 'long', 'strong', '2', and 'ii' specify long or strong variants of the specified type of potion. There are currently no potion variants that are both long and strong at the same time. Consequently, only one of these keywords is allowed to be used at the same time. However, we currently ignore any additional occurrences of the respectively other keywords. If the specified potion type does not support the selected variant, the keyword is currently ignored as well. But this might change and potentially become more strict in a future release.
    • Each keyword can occur at most once, but there may be multiple valid locations at which it can occur (which is why the above formats mention some keywords multiple times). However, for simplicity, the parsing does not actually take the order or dependencies of words into account currently, but only checks for the presence of the various keywords. But this might change and potentially become more strict in a future release. Any other words in the above formats that were not mentioned as keywords are optional.
New feature: Trade notifications.
  • Config: Added settings 'notify-players-about-trades' (default: disabled) and 'notify-shop-owners-about-trades' (default: enabled), which enable trade notifications for all players with certain permissions, or for shop owners about trades that take place in their own shops.
  • Permissions: Added permissions 'shopkeeper.trade-notifications.admin' and 'shopkeeper.trade-notifications.player' (both default to false). If trade notifications are enabled (setting 'notify-players-about-trades'), players with these permissions will receive trade notifications for all admin or all player shops respectively.
  • There are different sets of trade notification messages for different trade variations and contexts. The default messages do not make use of all of these variations, but this should provide a lot of flexibility when adjusting the messages.
  • In order to avoid notification spam, the notifications for equal trades that take place in quick succession are merged into a single notification. However, this does not completely prevent players from potentially causing spam by trading. If this is a concern to you, you may have to disable the trade notifications for now, until more sophisticated countermeasures are available to guard against this kind of spam.
  • A new editor option allows shop owners to disable trade notifications for individual shopkeepers. This only affects the trade notifications that are sent to the shop owner, not the general trade notifications that are sent to players with the respective permission.
  • Added command "/shopkeeper notify trades", which allows players to disable trade notifications. This command requires the new permission 'shopkeeper.notify.trades' (default: true).
    • Since we do not keep track of any user data yet, the trade notifications are only disabled for the current game session (until the player reconnects).
    • The first trade notification received during the current game session notifies the player that they can disable trade notifications via this command. This hint message is clickable and will automatically insert the command to execute into the player's chat box. This hint is only sent to players that have the permission to use the command.
  • Config: Added settings 'trade-notification-sound' (disabled by default) and 'shop-owner-trade-notification-sound'. These sound effects are played whenever a player (or shop owner) receives a trade notification. They can be disabled by setting them to an empty String inside the config.
Improvements related to the saving and loading of shopkeepers:
  • Fixed: Improved the error checking for both the serialization and the writing of shopkeeper data. This should also resolve an issue with the save data being lost when the disk is full.
  • We provide more detailed error and debug messages now when a save fails. For example, we provide better error messages if failures are caused by missing directory access permissions.
  • Replaced the old Java IO based implementation of saving and loading shopkeeper data with a new NIO based implementation. This should also contribute to more accurate error messages in case of failures.
  • Fixed/Debug: The logged number of shopkeepers that have been deleted since the last successful save might not have matched the actual number of deleted shopkeepers. This number did not take into account any shopkeepers that could not be deleted during previously failed save attempts.
  • Fixed: We explicitly wait for the new shopkeeper data to be written to disk now before we replace the old save data. This should provide additional protection against data loss and corruption in cases of severe system failures, such as crashes, power losses, etc.
  • We log a warning now if we are not able to atomically replace the old and new save data. There are several non-atomic fallback solutions for the case that the save file cannot be atomically renamed. However, these may result in data loss or corruption in case of severe system failures (hence the warning).
  • During plugin shutdown, we explicitly verify now that there really is no unsaved shopkeeper data, and that there are no saves pending or still in progress. Otherwise, we log a warning. This warning may for example be encountered if the final save during plugin shutdown fails.
  • Fixed: When a save fails, we also trigger a delayed save now even if there are no dirty shopkeepers. This is for example required if there has been an explicit save request, or if shopkeepers have been deleted. These changes would not be reliably persisted before.
  • When a save fails, we no longer serialize the data of the affected shopkeepers again during the subsequent save attempts if this data is still up-to-date.
  • The name of the temporary save file was slightly changed (`save.temp` -> `save.yml.tmp`).
  • We log a warning now whenever a shopkeeper is loaded or created that uses a shop type or shop object type that is disabled. We still load the shopkeeper, so that in the case of a player shop the container is still protected. But we no longer attempt to spawn the shopkeeper. Even though these shopkeepers might in some cases still seem to work as normal, there is no guarantee for this. Admins are advised to either delete these shopkeepers, or change their shop (object) types to something else.
Changes to the CSV trade logging:
  • The CSV data format has changed. If you automatically process the CSV trade logs, you may have to update your programs to account for the new format.
  • Config: Renamed 'enable-purchase-logging' to 'log-trades-to-csv'. The previous config is automatically migrated.
  • Config: Added setting 'log-item-metadata' (disabled by default). This enables the logging of item metadata.
  • In order to represent the logged trades more compactly, we merge equivalent trades that are triggered in quick succession over a certain period of time. By default, we merge successive equal trades for up to 15 seconds, but only if there is no gap larger than 5 seconds between the individual trades. The new settings 'trade-log-merge-duration-ticks' and 'trade-log-next-merge-timeout-ticks' control these parameters. They also allow the trade merging to be disabled.
  • Performance: The logging is performed asynchronously now, and in batches. When a trade takes place, we wait 30 seconds before we log the trade and any other trades that may have taken place during this duration.
  • Debug: Improved the error handling and debug output related to the CSV trade logging.
Several performance improvements:
  • Various performance improvements related to sign shops and the processing of physics events.
  • For load balancing purposes, the activities of shopkeepers are distributed over multiple Minecraft ticks now. However, processing the shopkeepers every tick, even if only a portion of them needs to do any actual work, also comes with a certain overhead. We therefore do not distribute their activities over all Minecraft ticks, but instead process them in groups only every 5 ticks.
  • Performance improvements related to the shopkeeper mob AI:
    • Config: Added the setting 'mob-behavior-tick-period' with a default value of 3.
      • This controls the rate at which we update the gravity and AI of shopkeeper mobs. Previously, these behaviors were updated every tick, as it is also the case in vanilla Minecraft. Values above 1 indicate a reduced tick rate, which result in a less smooth, less reactive, and possibly slower behavior in comparison to the behavior of mobs in vanilla Minecraft.
      • In order to compensate for a reduced tick rate, some activities are scaled accordingly. This ensures, for example, that mobs still rotate their head at the same speed towards nearby players, or that mobs still fall at the same speed when being affected by gravity. Consequently, a reduced tick rate is less performance-intensive in total, but may be slightly more performance-intensive per individual behavior update.
      • In my testing, the value 3 offered a large overall performance benefit with a relatively small additional performance impact per individual behavior update, while still providing an acceptable smooth mob behavior. Values above 3 are clearly noticeable and offer little additional benefit.
    • Reduced the rate at which the shopkeeper mob AI activations are updated for online players from once every 20 ticks to once every 30 ticks. This seems to be sufficient to still fluently activate nearby shopkeeper mobs even for players that fly around in creative mode. We also immediately activate the shopkeeper mob AI in nearby chunks now whenever a player joins the server or teleports.
    • Shopkeeper mobs no longer tick Minecraft's float behavior. This has no effect since they use the NoAI flag.
    • The shopkeeper mob AI task is no longer dynamically started and stopped, but instead keeps running even if there are no entities to process currently. Frequently stopping and restarting the task is itself associated with a certain overhead. And even if there are shopkeeper mobs, we can now very cheaply skip their processing altogether when we know that there are currently no chunks with neither active AI nor gravity.
    • Various other small optimizations to how the shopkeeper AI task checks if a mob is still valid, and how it stores, queries, and processes chunk and entity data.
    • On some Paper versions, maybe due to their async chunk loading, the player's current chunk may sometimes not be loaded yet. We now avoid accessing (and thereby loading) the chunk when activating the AI and gravity behavior of nearby shopkeeper entities.
  • Increased the chunk activation delay on chunk loads from 2 to 20 ticks. This further limits the rate at which shopkeepers may get spawned and despawned, for instance, when players frequently cross chunk boundaries back and forth. When a player joins the server or teleports, we immediately activate the chunks in a 2 chunk radius.
  • Added a spawn queue for shopkeepers spawned on chunk loads.
    • Spawning lots of shopkeepers at the same time can be quite costly performance-wise. This queue distributes the spawning of shopkeepers over multiple ticks to avoid performance drops.
    • We spawn at most 6 shopkeepers every 3 ticks (roughly 40 shopkeepers per second): These numbers are a balance between keeping the number of shopkeepers spawned per cycle low, while avoiding the general performance overhead associated with higher spawn rates.
    • In order to avoid players having to wait for shopkeepers to spawn, there are some situations in which we spawn the shopkeepers immediately instead of adding them to the queue. This includes: When a shopkeeper is newly created, when a shopkeeper is loaded (i.e. on plugin reloads), and after world saves. In the latter two cases, a potentially large number of shopkeepers is expected to be spawned at the same time. Due to its limited throughput, the queue would not be able to deal with this sudden peak appropriately. However, since these are situations that are associated with a certain performance impact anyways, we prefer to spawn all the affected shopkeepers immediately, instead of causing confusion among players by having them wait for the shopkeepers to respawn.
  • The check for whether the shopkeeper mob moved and needs to be teleported back reuses the previous spawn location now. Previously, this would freshly calculate the spawn location each time, which also involves a ray trace to find the exact location for the mob to stand on.
    • This change also ensures that shopkeeper mobs no longer start to fall if gravity is disabled and the block below them is broken. However, to account for shopkeepers that have previously been placed above passable or non-full blocks, which might have been broken since then, we still spawn shopkeeper mobs up to one block below their location even if gravity is disabled (e.g. when the chunk or the plugin are reloaded).
    • Another side effect of this change is that if gravity is disabled, it is no longer as easily possible to force the shopkeeper mob to move back to its original location after the block it was previously standing on is broken. The shopkeeper will only check for a new spawn location now when it is being respawned. If the mob is supposed to dynamically move when the block below it is broken, gravity needs to be enabled.
    • This reuse of the spawn location is limited to the movement check itself. If this detects that the shopkeeper actually moved and needs to be teleported back, a new spawn location is calculated as before. So if the shopkeeper previously spawned slightly below its actual spawn location (due to there missing some block), and gravity is enabled, players are still able to reset the shopkeeper's location by letting it fall due to gravity and then placing a block below its actual spawn location for the shopkeeper to stand on.
  • There have been various internal changes that allow us to avoid copying and comparing item stacks in many situations.
  • Improvements related to checking and deleting shopkeepers of inactive players.
  • Various other minor internal improvements.
Command changes:
  • The "/shopkeeper remove" command has been renamed to "/shopkeeper removeAll". All related permission nodes and some related messages have changed. The 'all' argument, which removes the player shops of all players, has been renamed to 'player'.
  • The "removeAll" command prints the number of shopkeepers now that have been skipped because they have either already been removed while the command was waiting for confirmation, or because their removal has been cancelled by a plugin.
  • Added command "/shopkeeper remove [shop]". This replaces the previous "remove" command and allows the removal of a single specific shopkeeper.
    • Added permission 'shopkeeper.remove.own' (default: op): Allows the removal of own shops via command.
    • Added permission 'shopkeeper.remove.others' (default: op): Allows the removal of shops of other players via command.
    • Added permission 'shopkeeper.remove.admin' (default: op): Allows the removal of admin shops via command.
  • Improved the feedback messages when a player tries to create a shopkeeper via command.
  • When you target a container, it is now also possible to create an admin shop via command by explicitly specifying the admin shop type as command argument. Previously, the plugin would always assume that you are trying to create a player shop in this situation.
  • There have been a few minor fixes related to command arguments that should result in more detailed error messages when they cannot be parsed.
Changes related to Citizens shopkeepers:
  • Fixed: Previously, if the location of a Citizens shopkeeper changed due to the NPC moving around, it was not guaranteed whether or not that location change would be persisted.
  • Similar to non-Citizens shopkeepers, we also periodically respawn Citizens shopkeepers now if they have previously been spawned (i.e. if they have an associated entity) but their entity has been removed, for example by another plugin. If the NPC has intentionally been despawned, it is not automatically respawned.
  • Changes to Citizens shopkeeper NPC names:
    • NPCs are initially created with an empty name now. Only if the NPC is of type player, we subsequently assign it a name, because this determines its initial skin. If the shopkeeper is a player shop, we use the shop owner's name as before. Otherwise, we try to use the name of the player who created the shopkeeper. If this is not available, we fallback to an empty name.
    • We no longer add the nameplate prefix if the NPC is of type player, because this messes with the NPC's skin.
    • When we set the NPC's name, we now also set the nameplate visibility: If the name is empty, the nameplate is hidden. Otherwise, the 'always-show-nameplates' setting determines whether the nameplate is always shown, or whether it is only shown when a player directly looks at the entity (this only works for non-player NPCs though).
  • Config: Added setting 'default-citizen-npc-type' (default: 'PLAYER') which controls the entity type used by newly created Citizens shopkeeper NPCs.
    • Admin shopkeepers also use player NPCs by default now. Using villager NPCs for them has caused some confusion in the past.
    • This also resolves an issue for offline mode servers: On recent versions of Citizens, the creation of player NPCs fails if they share the same name as regular players on the server, due to some conflict with their UUIDs being the same.
  • We no longer automatically delete invalid Citizens shopkeepers by default.
    • This has caused some issue in the past due to Citizens shopkeepers being incorrectly classified as invalid in some situations. By default, we only log warnings now about any detected invalid Citizens shopkeepers, and instructions on how these shopkeepers can be deleted in order to get rid of these warnings.
    • Config: Added setting 'delete-invalid-citizen-shopkeepers' (default: false). This setting can be used to enable the previous behavior of automatically deleting invalid Citizens shopkeepers again.
    • Alternatively, the new command "/shopkeepers cleanupCitizenShopkeepers" can be used to manually check for and delete invalid Citizens shopkeepers. This command requires the new permission 'shopkeeper.cleanup-citizen-shopkeepers' (default: op).
    • If a NPC is deleted and there are multiple shopkeepers associated with it, all of these shopkeepers are deleted now.
  • There have been several other internal refactors related to Citizens shopkeepers. Check the complete changelog for details.
Debugging improvements:
  • Added command "/shopkeeper testDamage [damage] [times-per-tick] [duration-ticks]", which can be used to debug the performance of handling lots of damage events.
  • Added debug command "/shopkeeper testSpawn [repetitions]", which measures the time it takes to respawn the active shopkeepers within the current chunk.
  • Minor improvements and additions to the "/shopkeeper checkitem" command.
  • Various small fixes and additions related to the "/shopkeeper check" command. For example, this also shows chunk activation timings now, and statistics on the current and maximum number of pending shopkeeper spawns. We also no longer reset the shopkeeper mob AI and gravity statistics when there are no more active entities.
  • The command "/shopkeeper debug [option]" can toggle debug options now.
  • It should be easier now to identify tasks inside timing reports, because they now use named classes instead of lambdas.
  • Added debug option 'visualize-shopkeeper-ticks', which enables an in-game visualization of shopkeeper and shop object ticking activities by using particles.
  • Added debug option 'regular-tick-activities'. The debug output for a few non-exceptional ticking activities, which could sometimes be considered spam if one is not specifically interested in them, such as shopkeepers teleporting back into place, or mobile Citizens shopkeepers updating their shopkeeper's location, are disabled by default now. This new debug option enables them again.
  • Added debug information about the number of shopkeepers that actually had to be spawned or despawned during the spawning or despawning of a chunk's shopkeepers.
  • When the result item of a trade does not match the expected result item, or when a strict item comparison fails, we additionally log the serialized Yaml representation of the involved items now.
  • The output of the "/shopkeeper yaml" command is logged as a single multi-line message now. This should make it easier to copy it from the server log and paste it into the config (depends on the logging configuration though). Also, the output includes the ItemStack's serialized type key now, and the used keys are more context specific.
  • We log more information now when we debug failed command executions.
  • When the shopkeeper editor is closed, we log the number of shopkeeper offers that have changed.
Other changes:
  • Players in creative mode are no longer ignored when they use the shop creation item.
  • Fixed: The shop creation item can no longer be renamed in anvils if the 'prevent-shop-creation-item-regular-usage' setting is enabled.
  • Changes to the maximum shops limit:
    • Config: A value of '0' for the 'max-shops-per-player' setting no longer indicates no limit, but can be used to disable the creation and hiring of player shops. 'No limit' is indicated by a value of '-1' now. Any previous limit of '0' is automatically migrated.
    • Permission: Added permission 'shopkeeper.maxshops.unlimited' (default: op), which disables the maximum shops limit for a player.
    • Minor performance improvements related to how the maximum shops limit permissions, that are specified inside the config, are checked. An effect of this optimization is that it is only possible to increase the default limit for players, not decrease it.
  • When the plugin runs on an unsupported server version, we no longer add a movement speed attribute modifier to mobs in order to make them stationary. This should no longer be required, because on all recent and supported server versions we use the NoAI flag to make the mobs stationary.
  • There have been some changes to how shopkeepers and shop objects are ticked. This also replaces the previous task that periodically checked whether the shop object is still active or needs to be respawned. The setting 'enable-spawn-verifier' has been removed: The plugin always periodically checks now if the mobs are still there or if they need to be respawned, regardless of this setting.
  • If a shop object cannot be respawned a few times in a row, the rate at which it reattempts the spawning is throttled now. Previously, it would permanently abort all respawn attempts in this case.
  • When a shopkeeper is marked as dirty during ticking, we trigger a delayed save instead of an immediate save now.
  • Fixed: Previously, after the Shopkeepers plugin has been dynamically reloaded, GriefPrevention prevented players from using the shop creation item or interact with shopkeepers in protected regions. This issue has been resolved by dynamically reordering the registered event handlers so that our event handlers are always executed first.
  • We only print the shop creation item usage message if the player is still holding the item after a short delay now. This avoids message spam when a player quickly scrolls through the items on the hotbar via the mouse wheel.
  • Fixed: We sometimes receive an additional left-click air interaction event when a player right-clicks air while looking at a block slightly outside of the interaction range. This led to the shop creation item switching between two selections back and forth for a single right-click. We ignore this additional left-click air interaction now by ignoring any subsequent interactions that occur within a brief time span of the last handled interaction. The ignored interactions are still cancelled to prevent any vanilla behaviors or side-effects of other event handlers, but they no longer change the player's selection.
  • Fixed: Closing the shopkeeper editor did not immediately trigger a save, but relied on the periodic shopkeeper tick task to trigger a save. Also, we check now which trades have actually changed and only trigger a save if the shopkeeper was actually modified.
  • Added an editor option to rename regular villagers. Unlike the renaming via nametags, this allows the use of color codes.
  • Added an editor option to toggle the pumpkin head of snowman shopkeepers.
  • Added an editor option to change the color of shulker shopkeepers.
  • Added an editor option to toggle the invulnerability of regular non-shopkeeper villagers.
  • Added sounds to the various buttons inside the editor menu.
  • Players have to confirm now when they delete a shopkeeper via the editor. This also applies to the deletion of the villager via the editor for regular villagers.
  • We also send the 'shop-removed' message now when a shopkeeper is deleted via the editor menu. Similarly, deleting a regular villager via the villager editor will also print a message now.
  • When using the villager editor, we check more frequently now whether the villager still exist, and close the editor if it does not.
  • Fixed: Striders, magma cubes, and blazes are now able to stand on top of lava. This only applies if they are not completely submerged by lava (in which case they don't float to the top as they do in vanilla Minecraft, but sink to the ground as before).
  • When creating a shopkeeper via command, it is now possible to place it on top of liquids by targeting a water or lava block. If the player is under water (or inside of lava), the shopkeeper is placed at the targeted block as before. Since we spawn shopkeepers up to one block below their location, this still allows placing shopkeepers on the ground in shallow liquids, without them being continuously teleported back if they are not able to stand on top of the liquid.
  • Buying shopkeepers can also buy written books and enchanted items now. Being able to buy written books is probably not really useful though, because any book item being bought has to nearly perfectly match the requested book item.
  • Config: Added setting 'disable-inventory-verification' (default: false). Even though modded servers (Cauldron, Mohist, etc.) are not officially supported, this setting may help to resolve a particular known incompatibility with these types of servers.
  • When the deletion of shopkeepers of inactive players is enabled, we not only check for inactive players during plugin startup, but also periodically now (roughly every 4 hours). This accounts for servers that keep running for long durations. We also log a message now whenever we check for shopkeepers of inactive players.
  • Fixed: Editing and removing trades from a shopkeeper while another player is trading with it could result in an exception due to an issue with the insertion of empty dummy trades. These empty dummy trades are required because the Minecraft client cannot deal with the list of trades dynamically shrinking in size. However, since the insertion of empty dummy trades is rather confusing for players, we also try now to heuristically guess the trades that were removed and then instead insert blocked dummy trades that correspond to these trades.
  • Fixed: Forge clients seem to send additional off-hand interactions when interacting with villagers. This breaks our villager editor, because it immediately closes the villager editor again and instead opens the regular villager trading interface. In an attempt to resolve this incompatibility, we now cancel all off-hand interactions with regular villagers if the player already has some inventory open.
  • Fixed: Shopkeeper entities are now marked as invulnerable, so that other entities ignore them in various additional situations. For example, villagers are no longer panicked by nearby hostile mob shopkeepers.
  • Added more player feedback messages for cases in which the trading may fail for some reason.
  • Fixed: When handling a shopkeeper hire attempt, we first check now if the shopkeeper is still for hire.
  • Fixed: Piglin brute mobs do not support a baby variant. Their shopkeeper type will therefore also no longer show the baby option in the editor.
  • Fixed: Book shops logged warnings when they were loaded.
  • Fixed: The shopkeeper metadata is also removed from an entity again now if the spawning failed.
  • Metrics: The shopkeepers count chart groups its results into slightly more detailed categories now.
  • Internal: Building requires Java 16 now. Building the Spigot dependencies requires both Java 8 and Java 16. The 'installSpigotDependencies' script will automatically install and switch between these JDK versions during the build.
  • There have been major refactors related to how the config and language files are loaded.
  • There have been various other, mostly internal changes that are not explicitly listed here. See the complete changelog if you are interested in these details.
Other config changes:
  • The settings 'edit-regular-villagers' and 'edit-regular-wandering-traders' are now disabled by default. This feature seems to cause confusion for people who are not aware of it. Regular villagers can still be edited by default via the "editVillager" command.
  • Added piglin brute to the by default enabled mob types.
  • Added shulker to the by default enabled mob types. However, note that this mob will currently stay in its closed form due to its disabled AI.
  • The default enabled shopkeeper mobs are now alphabetically sorted. This only applies to newly generated default configs.
  • Fixed: The living shop object types were not registered in the order specified inside the config.
  • The 'enabled-living-shops' setting is slightly more lenient now when parsing the specified mob types. Previously, the mob type names had to perfectly match the server's entity type names.
  • Fixed: If the material of the configured shop creation item was invalid, the used default shop creation item used a display name with untranslated color codes.
  • Fixed: Specifying meta data for items of type AIR (which do not support meta data) no longer results in an exception.
  • Updated the description of some settings.
  • Improved the validation and error feedback of some settings. For example, legacy item types, and item types that are not actually items, can no longer be specified inside the config. We log a warning when we encounter such an item type.
API changes:
  • There have been several API changes, including breaking API changes. See the complete changelog for details.
  • The most notable breaking change is the introduction of 'UnmodifiableItemStack'. All methods that previously returned copies of internal item stacks will now return unmodifiable item stacks.
  • Some methods and interfaces have been renamed. For example, 'TradingOffer' is now called 'TradeOffer'.
  • Added factory methods to the TradeOffer, PriceOffer, and BookOffer interfaces. These are now preferred over the factory methods found in ShopkeepersAPI and ShopkeepersPlugin. The latter have been deprecated and may be removed in the future.
  • PlayerCreatePlayerShopkeeperEvent and PlayerShopkeeperHireEvent: The meaning of the maximum shops limit has changed. A value of 0 or less no longer indicates 'no limit'.
  • Fixed: Event handlers for the specific PlayerCreateShopkeeperEvent were not actually getting invoked.
  • There have been some changes related to object ids. Object ids are no longer exposed in the API.
  • There have been some changes around the meaning of 'active shopkeepers' and 'active shop objects', and the behavior of related methods. Also, several ShopObject methods were slightly optimized to no longer check if the shop object is currently active, but only if it has been spawned, which is sufficient most of the time. ShopObject#isSpawned has been added as a more lightweight variant of ShopObject#isActive.
  • Various aspects and methods related to shop object spawning are no longer exposed in the API.
  • We skip spawning and activating shopkeepers now if they are immediately removed again during the ShopkeeperAddEvent.
  • Removed ShopkeeperRegistry#loadShopkeeper from the API. This isn't properly supported by the implementation currently.
  • Removed Shopkeeper#isDirty() from the API.
  • Added ShopkeeperStorage#saveIfDirty and #saveIfDirtyAndAwaitCompletion.
  • Fixed: We now call the ShopkeeperEditedEvent when the player closes the editor and at least one trade offer has changed.
  • The blocks of sign shopkeepers are also marked with the shopkeeper metadata now.
  • Sign shop objects no longer return a name. We previously returned the sign's second line. However, this isn't really useful anymore because the exact sign contents are configurable now.
  • CitizensShopObject#getName returns the NPC name instead of its 'full name' now (i.e. the name that more closely corresponds to the name that has been set via #setName).
  • Added methods to BlockShopObjectType and EntityShopObjectType to query and check for shopkeepers of that specific type. This is less performance intensive compared to checking all shop object types when querying the ShopkeeperRegistry.
  • There have been a few other small API additions, as well as several Javadoc improvements and clarifications. Check the complete changelog and the API documentation for details.
  • Internal API: There have been several internal changes that may affect you if you rely on the internal API or implement custom shopkeeper types. See the complete changlog for details.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.

Thanks!
----------, Jun 22, 2021

v2.12.0 for MC 1.16.5, 1.16.4, 1.16.3, 1.16.2, 1.16.1, 1.15.2, 1.14.4
  • Updated for MC 1.16.4.
  • Bumped Towny dependency to 0.96.2.0 and using Jitpack repository for it now.
  • Fixed: Creating shopkeepers via Citizens trait failed previously if the block at the spawn location is not passable (eg. when the Citizens NPC stands on a non-full block such as carpet).
  • Minor changes to handling failures when trying to create a shopkeeper via Citizens trait. We always inform the player (if there is one), log a warning and delete the trait again now.
  • Config: Added some more examples for the 'name-regex' setting to the default config.
  • Fixed: Some messages would print an empty line when set to an empty text, instead of being disabled.
  • Changed: Players without the permission to edit regular villagers will silently access the regular trading interface now when they sneak and right-click a regular villager.
  • Fixed: The Towny integration could run into a NPE when checking if a location is within a commercial area.
API:
  • PlayerOpenUIEvent indicates whether the UI request has been silent now.
Internal changes:
  • Moved the installation of Spigot dependencies into a separate script.
  • Added support for building with Jitpack. This uses a Maven wrapper with a fixed version, because Jitpack uses a buggy Maven version currently (3.6.1).
  • Updated building instructions in readme.
  • Internal API: UIHandler#canOpen is public and has an additional 'silent' flag now.
  • Internal API: UI requests can be silent now.
  • Editor UIs are setup lazily now, only when required for the first time.
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.
Thanks!
----------, Nov 4, 2020

v2.11.0 for MC 1.16.3, 1.16.2, 1.16.1, 1.15.2, 1.14.4
Update for MC 1.16.2:
  • Config: Added piglin brute to the by default enabled mob types. If you are updating, you will have to manually add this to your config's 'enabled-living-shops' setting.
Other changes:
  • Added: New command "/shopkeeper givecurrency [player] ['low'|'high'] [amount]".
    • This command can be used to create and give the currency items which have been specified inside the config.
    • Added corresponding permission node "shopkeeper.givecurrency" (default: op).
  • Added: When giving items via command to another player we now also inform the target player that he has received items. These newly added messages are also used now when giving items to yourself.
  • Added: New command "/shopkeeper convertItems [player] ['all']".
    • This command can be used to convert the held (or all) items to conform to Spigot's internal data format. I.e. this runs the items through Spigot's item serialization and deserialization in the same way as it would happen when these items are used inside shopkeeper trades and the plugin gets reloaded.
    • Added corresponding permission node "shopkeeper.convertitems.own" (default: op). This allows converting own items.
    • Added corresponding permission node "shopkeeper.convertitems.others" (default: op). This allows converting items of other players.
  • Added config options for the automatic conversion of items inside the inventories of players and shop chests to Spigot's internal data format whenever a player is about to open a shopkeeper UI (eg. trading, editor, hiring, etc.).
    • Added config option "convert-player-items" (default: false). This enables and disables the automatic item conversion.
    • Added config options "convert-all-player-items" (default: true) and 'convert-player-items-exceptions' (default: []). These two settings allow limiting which items are affected or ignored by the automatic conversion.
    • Note: Enabling this setting comes with a performance impact. You should generally try to avoid having to use this setting and instead search for alternative solutions. For more information, see the notes on this setting inside the default config.
  • Debug: Added debug option 'item-conversions' which logs whenever we explicitly convert items to Spigot's data format. Note that this does not log when items get implicitly converted, which may happen under various circumstances.
  • Config: Added option 'max-trades-pages' (default: 5, min: 1, max: 10) which allows changing the number of pages that can be filled with trading options. This limit applies to all shopkeepers (there are no different settings for different types of shops or different permission levels so far). Note: The scroll bar rendered by the Minecraft client will only work nicely for up to 64 trades.
  • Added: It is now possible to change the size of slimes and magma cubes. Their default size is 1 (tiny). Even though Minecraft theoretically allows sizes up to 256, we limit the max size to 10. This avoids running into issues such as related to rendering, performance and not being able to interact with the slime or magma cube. If you have market areas where players can create their own shops and they are able to create slime or magma cube shopkeepers, you might want to take this maximum slime/magma cube size into account when assigning shop areas to players.
  • Fixed: Slimes and magma cubes no longer spawn with random size whenever they are respawned.
  • Fixed: Various optional (context dependent) command arguments were shown to be required inside the Shopkeepers command help.
  • Fixed: We no longer attempt to spawn Citizens NPCs when creating or loading Citizens shopkeepers if the spawn location's world is not loaded currently.
  • Fixed: Some versions of Citizens would produce an error when we try to teleport a NPC which has no location and is therefore not spawned currently. The teleport attempt has been replaced with an attempt to spawn the NPC.
  • Fixed: The "shopkeeper.*" permission was missing some child permissions.
  • Removed: The legacy permissions "shopkeeper.player.normal", "shopkeeper.villager", "shopkeeper.witch" and "shopkeeper.creeper" have been removed. Use the corresponding replacement permissions instead.
  • Changed: All players have access to all mob types (permission "shopkeeper.entity.*") by default now.
  • Added: The new 'all' argument for the "/shopkeeper list" command will list all shops now (admin and player shops). (Thanks to Mippy, PR 669)
  • Added: It is possible to use barrels and shulker boxes as containers for player shops now.
  • Added a message (msg-unsupported-container) when a player tries to select a type of container which is not supported by shopkeepers (i.e. hopper, dropper, dispenser, brewing stand, ender chest, or a type of furnace).
  • API: Deprecated PlayerShopkeeper#getChestX/Y/Z, #get/setChest, #getCurrencyInChest, #openChestWindow and PlayerShopCreationData#getShopChest and added corresponding replacements methods with more general names.
  • Various UI related changes:
    • API: It is now possible to create and open UIs that are not associated with any shopkeeper. UISession#getShopkeeper may return null now.
    • API: Added PlayerOpenUIEvent.
    • API: The ShopkeeperOpenUIEvent no longer extends ShopkeeperEvent, but the newly added PlayerOpenUIEvent instead.
    • API: Removed Shopkeeper#isUIActive, #deactivateUI, #activateUI. This is now part of the UISession.
    • API: Added UISession#close(), #closeDelayed(), #closeDelayedAndRunTask(Runnable), #abort(), #abortDelayed(), #abortDelayedAndRunTask(Runnable).
    • API: Added Shopkeeper#getUISessions() and #getUISessions(UIType).
    • API: Deprecated Shopkeeper#closeAllOpenWindows() and replaced it with #abortUISessionsDelayed().
    • API: Added UIRegistry#getUISessions(), #getUISessions(Shopkeeper), #getUISessions(Shopkeeper, UIType), #getUISessions(UIType).
    • API: Deprecated UIRegistry#getSession(Player) and added replacement #getUISession(Player).
    • API: Deprecated UIRegistry#getOpenUIType(Player).
    • API: Deprecated UIRegistry#closeAll(), #closeAll(Shopkeeper) and #closeAllDelayed(Shopkeeper) and added replacements #abortUISessions(), #abortUISessions(Shopkeeper) and #abortUISessionsDelayed(Shopkeeper).
  • Minor fix: We check if the shopkeeper is still valid before attempting to open its container now.
  • Minor fix: If the second buy item of a trading recipe is empty, the corresponding created merchant recipe stores that as an empty second ingredient now. This should help when checking if the existing merchant recipes still match the newly created merchant recipes and thereby cause less recipe updates that are not actually required.
  • Fixed: Monster shopkeepers no longer burn when standing in sunlight.
    • Monsters usually get set on fire quite frequently when standing in sunlight. We therefore give zombies and skeletons a stone button as helmet now. This prevents them from getting set on fire in sunlight, by which we have to process less EntityCombustEvents. The stone button is also small enough to not be visible inside their head.
    • Entities standing in lava or fire are still set on fire as before.
Added editor for regular villagers and wandering traders:
  • See the wiki: https://github.com/Shopkeepers/Shopkeepers-Wiki/wiki/Editor-for-regular-villagers
  • Any villagers and wandering traders which are not Citizens NPC or shopkeepers are considered 'regular'.
  • The editor supports editing the villager trades, similar to how editing works for admin shopkeepers. Note that trades created or edited via the editor will have infinite uses, no xp rewards, no price multipliers and the current uses counter gets reset to 0 (there are currently no options to edit or persist these attributes).
  • To not accidentally edit all original trades whenever the editor is opened and closed (and thereby change the above mentioned trade attributes), we compare the trades from the editor with the villager's current trades before applying the trades from the editor: If the items of a trade are still the same, we keep the original trade without changes. A message indicates how many trades have been modified.
  • Since villagers may change their trades whenever they change their profession, we set the villager's xp to at least 1 whenever the villager's trades or profession have been modified via the editor.
  • If the villager is killed or gets unloaded while editing, any changes in the editor will have no effect.
  • Other supported villager editor options are:
    • Deleting the villager entity.
    • Opening a copy of the villager's inventory. Note that any changes to the opened inventory are not reflected in the villager's inventory currently (i.e. you can view, but not modify the villager inventory with this).
    • Changing the villager profession. Changing the profession via the editor will keep the current trades.
    • Changing the villager type (i.e. the biome specific outfit).
    • Changing the villager level (i.e. the badge color). This also affects which level is displayed and whether the villager's xp is shown within the villager's trading UI.
    • Toggling the villager's AI on and off. This is useful to make the villager stationary while editing it. Otherwise it may wander away.
  • Permissions: Added "shopkeeper.edit-villagers" and "shopkeeper.edit-wandering-traders" (default: "op"). These are required to edit regular villagers or wandering traders respectively.
  • Added command "/shopkeeper editVillager [villager]". This opens an editor to edit the specified villager / wandering trader. The villager / wandering trader can either be specified by uuid or by looking at it.
  • Config: Added settings "edit-regular-villagers" and "edit-regular-wandering-traders" (default: "true"). With these settings enabled the villager editor can be opened by simply sneaking and right-clicking a regular villager (similar to how editing works for shopkeepers).
Internal changes:
  • Slightly changed how we cycle through the villager levels (badge colors).
  • Added support for Lists of ItemData inside the config.
  • We throw an exception now when we encounter an unexpected / not yet handled config setting type.
  • We load all plugin classes up front now. This should avoid issues when the plugin jar gets replaced during runtime (eg. for hot reloads).
  • Various internal renaming related to shop containers.
  • Replaced EditorHandler#closeEditorAndRunTask with UIHandler#closeDelayedAndRunTask.
  • Moved UIHandler#getShopkeeper into a separate ShopkeeperUIHandler class. The existing editor, trading and hiring UIs extend from that now.
  • Various internal formatting of code comments.
  • Removed UIHandler#closeDelayedAndRunTask and replaced it with using the new methods inside UISession.
  • Various minor refactoring inside SKUIRegistry.
  • Delayed closing of UIs uses the SchedulerUtils now, which guards against issues during plugin shutdown.
  • The created villager trading recipes use a 'max-uses' limit of the maximum integer value now (instead of 10000). If the trade is 'out of stock' both the 'max-uses' and the 'uses' are set to 0. This change should probably not affect anyone though.
  • Added new command arguments to specify an entity by uuid.
  • Added new command arguments to select a targeted entity.
  • Moved and added some merchant and trading recipe related utilities into MerchantUtils.
  • Minor changes to the comparison of merchant recipes.
  • Moved the shopkeeper metadata key constant into ShopkeeperUtils.
  • Added ItemUtils#getOrEmpty(ItemStack).
  • ShopkeeperUIHandler is an interface now. This allows for more flexibility in the class hierarchy of UI handlers. Added a basic implementation 'AbstractShopkeeperUIHandler'.
  • Removed the unused SKDefaultUITypes#register() method.
  • Various refactoring related to the editor UI. There is now a separate base class for the shared implementation of the shopkeeper editor and the new villager editor UI. Any shopkeeper references had to be removed from the base class. All existing shopkeeper editor buttons had to be slightly adapted to this change.
  • Minor refactoring related to the handling of wandering traders not supporting the baby state.
  • Minor: All type registries (shop types, shop object types, UI types, ..) remember the order of their registered types now. This should have no noticeable effect, other than maybe on the order of command argument completion suggestions.
  • Most block and entity shop object types share the same object ids now. The idea is that this might allow for optimization when doing shopkeeper lookups.
Config changes:
  • The default value of the "prevent-shop-creation-item-regular-usage" setting was changed to "true".
  • The default value of the "shop-creation-item" setting was changed to a villager spawn egg with display name "&aShopkeeper". You can give yourself this item in game via the "/shopkeeper give" command.
  • The "use-legacy-mob-behavior" setting was broken since MC 1.14 and has been removed now. All shopkeeper entities always use the NoAI flag now.
  • The default value of the "enable-citizen-shops" setting was changed to "true".
  • Changed a few comments inside the default config related to the shop container changes.
  • Bumped config version to '3'. A few settings were renamed which get automatically migrated:
    • "require-chest-recently-placed" (now "require-container-recently-placed")
    • "max-chest-distance" (now "max-container-distance")
    • "protect-chests" (now "protect-containers")
    • "delete-shopkeeper-on-break-chest" (now "delete-shopkeeper-on-break-container")
    • "enable-chest-option-on-player-shop" (now "enable-container-option-on-player-shop")
    • "chest-item" (now "container-item")
Added messages:
  • msg-currency-items-given
  • msg-high-currency-items-given
  • msg-high-currency-disabled
  • msg-shop-creation-items-received
  • msg-currency-items-received
  • msg-high-currency-items-received
  • msg-command-description-give-currency
  • msg-command-description-convert-items
  • msg-items-converted
  • msg-button-slime-size
  • msg-button-slime-size-lore
  • msg-button-magma-cube-size
  • msg-button-magma-cube-size-lore
  • msg-unsupported-container
  • msg-missing-edit-villagers-perm
  • msg-missing-edit-wandering-traders-perm
  • msg-must-target-entity
  • msg-must-target-villager
  • msg-target-entity-is-no-villager
  • msg-villager-editor-title
  • msg-villager-editor-description-header
  • msg-villager-editor-description
  • msg-button-delete-villager
  • msg-button-delete-villager-lore
  • msg-button-villager-inventory
  • msg-button-villager-inventory-lore
  • msg-button-mob-ai
  • msg-button-mob-ai-lore
  • msg-villager-inventory-title
  • msg-set-villager-xp
  • msg-no-villager-trades-changed
  • msg-villager-trades-changed
  • msg-command-description-edit-villager
Changed messages (you will have to manually update those!):
  • Some message settings were renamed. If you don't use a custom / separate language file, they get automatically migrated as part of the config migration to version 3. However, most of these messages also had changes to their default contents which need to be applied manually.
    • msg-button-chest (now msg-button-container)
    • msg-button-chest-lore (now msg-button-container-lore)
    • msg-selected-chest (now msg-container-selected)
    • msg-must-select-chest (now msg-must-select-container)
    • msg-no-chest-selected (now msg-invalid-container)
    • msg-chest-too-far (now msg-container-too-far-away)
    • msg-chest-not-placed (now msg-container-not-placed)
    • msg-chest-already-in-use (now msg-container-already-in-use)
    • msg-no-chest-access (now msg-no-container-access)
    • msg-unused-chest (now msg-unused-container)
    • msg-cant-trade-with-shop-missing-chest (now msg-cant-trade-with-shop-missing-container)
  • msg-creation-item-selected
  • msg-shop-setup-desc-selling
  • msg-shop-setup-desc-buying
  • msg-shop-setup-desc-trading
  • msg-shop-setup-desc-book
  • msg-trade-setup-desc-selling
  • msg-trade-setup-desc-buying
  • msg-trade-setup-desc-book
Known potential issues: See here.

Donations
If you like this plugin, consider making a donation.
Thanks!
----------, Aug 13, 2020

Resource Information
Author:
----------
Total Downloads: 496,321
First Release: Jun 27, 2020
Last Update: Dec 9, 2024
Category: ---------------
All-Time Rating:
55 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings