UploadedAug 12, 2020
Supported Bukkit Versions
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.
- 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:
- 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).
- 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.
- 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")
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)
Known potential issues: See here.
If you like this plugin, consider making a donation.