Hireable Player Shops - Shopkeepers/Shopkeepers-Wiki GitHub Wiki

Admins can create player shops and offer them for hire: Another player pays a configured hire cost item and becomes the new owner of the shop.

Compared to a normally owned shop, the owner and members of a hired shop are limited in what they can do with the shop. For instance, they cannot delete or move the hired shop.

A hired player shop remembers its hire cost item. It can later revert to the for-hire state, either because the owning player decides to give up the shop, or because the hired shop expires after a configured duration (see Player Shop Expiration).

A typical use case for this feature is for admins to set up shops in a market area that can be hired by other players.

Setting up a hireable shop

As a player with the shopkeeper.setforhire permission (default: op):

  • Create a player shop as usual.
  • Hold the the item in your hand that you want to charge for hiring the shop.
  • Look at one of your shops (or at one of its containers).
  • Use the command /shopkeeper setForHire [shop].

Note: This feature is primarily meant for admins to set up the shops. The hire cost item is payed to the server, not the previous shop owner. And shops that are currently for hire do not count towards the max-shops-per-player limit. Players with the shopkeeper.setforhire permission can therefore create an unlimited number of shops by repeatedly setting them for hire. Is is therefore recommended to not grant this permission to normal players.

While a shop is for hire

  • The shop is renamed to "For Hire" (can be customized via Language Files) and cannot be traded with, neither by interacting with it nor via /shopkeeper remote. Any previously set custom shop name is lost and not restored when the shop is hired.
  • The shop does not count towards its owner's max-shops-per-player limit.
  • The previous owner and shop members keep access to the shop containers and the editor until somebody hires the shop.
  • Right-clicking the shop opens the hiring window instead of the trading window.

Hiring a shop

Right-click a shop that is for hire to open the hiring window. It shows the required hire cost item in the middle, with a Hire button on either side: Clicking one of those buttons hires the shop.

Hiring requires:

  • The shopkeeper.hire permission (default: true).
  • Enough of the hire cost item in your inventory. The items are consumed, they are not paid out to the previous owner.
  • A free shop slot, i.e. the max-shops-per-player limit must not be reached yet.
  • If hire-require-creation-permission is enabled (default: true): The permission to create shops of this shop and object type.

Hiring a shop:

  • Transfers the ownership to the hiring player.
    Note: The previous owner can also re-hire the same shop, which is especially relevant when hired shops expire (see Player Shop Expiration).
  • If the owner has changed:
    • Clears the shop members.
    • Clears the trade offers.
  • If hired-player-shop-expiration-days is enabled: Restarts the expiration.
  • Remembers the hire cost item, so that the shop can be offered for hire again later.

Other properties of the shopkeeper, such as its visual appearance, are preserved.

Limitations for owners of hired shops

A hired shop is meant to stay where it was set up, so that it can be handed over to the next player in the future. Compared to a normally owned player shop, the owner and members of a hired shop are therefore restricted in what they can do with the hired shop:

Action Allowed Exempt with
Set up trades, rename, edit the shop object Yes
Open the shop containers Yes
Break a shop container, or place certain blocks next to it No shopkeeper.bypass
Add or remove shop containers in the editor No shopkeeper.setforhire
Move the shop No shopkeeper.setforhire
Delete the shop in the editor No, the shop is offered for hire again instead
Delete the shop via /shopkeeper remove or /shopkeeper removeAll No shopkeeper.bypass

Additional notes:

  • The container protection requires protect-containers to be enabled. If you disable it, the containers of hired shops are not protected either.
  • If delete-shopkeeper-on-break-container is enabled and the shop's last container is broken somehow, for example by a player with the shopkeeper.bypass permission, the hired shop is deleted instead of being offered for hire again.
  • Shops that were hired before Shopkeepers v2.28.0 did not retain their "hired" state and are therefore treated like normally owned player shops, without these limitations.

Returning a hired shop

A hired shop reverts to its for-hire state in the following ways:

  • Manually: The current owner decides to give up the shop, e.g. to free up a slot of their max-shops-per-player limit, and clicks the Put up for hire button in the editor and confirms.
    Note: They do not get back their previously paid hire cost items.
  • Automatically after some time: If hired-player-shop-expiration-days is enabled, the shop reverts to its for-hire state when it expires (see Player Shop Expiration).
  • Automatically for inactive players: Ifplayer-shopkeeper-inactive-days is enabled, hired shops of inactive players revert to their for-hire state instead of being deleted (see Player Inactivity).

As an admin, to fully delete a hired shop, first make it a normal shop again by using the command /shopkeeper setNotForHire [shop] (permission shopkeeper.setforhire) and then delete it as usual.

Commands

See Commands for details.

Command Description
/shopkeeper setForHire [shop] Offers the shop for hire, using the held item as the hire cost.
/shopkeeper setNotForHire [shop] Stops offering the shop for hire and clears its hire cost item.

Permissions

See Permissions for details.

Permission Default Description
shopkeeper.hire true Hire shops that are offered for hire.
shopkeeper.setforhire op Offer shops for hire, and stop offering them. Also exempts from the editing restrictions of hired shops.
shopkeeper.bypass op Exempts from the container protection of hired shops, and allows deleting them via command.

Configuration

See Configuration for details. Relevant settings:

  • hire-item: The item used for the hire buttons in the hiring window.
  • hire-require-creation-permission: Whether hiring a shop requires the permission to create shops of this shop and object type.
  • hired-player-shop-expiration-days: After how many days a hired shop reverts to its for-hire state. 0 disables the expiration of hired shops.
  • max-shops-per-player: Shops that are currently for hire do not count towards this limit.
  • protect-containers: Also protects the containers of hired shops against their own owner and members.
  • player-shopkeeper-inactive-days: Restores hired shops of inactive players to their for-hire state.

The settings hire-other-villagers and hire-wandering-traders are unrelated to this feature: They control whether non-shopkeeper villagers / wandering traders can be converted into shopkeeper creation items.