Commands - Shopkeepers/Shopkeepers-Wiki GitHub Wiki

Usually commands are not needed to create or setup shops. Most of the listed commands are therefore only useful for admins. Information about the required permission nodes for each command can be found at the Permissions page.

Command Arguments

  • [arg]: Optional argument. However, some arguments may only be optional in certain cases, such as when running the command as a player, or when looking at a target shopkeeper.
  • <arg>: Required argument.
  • <arg1|arg2>: Alternative arguments. Requires input for either argument arg1 or argument arg2.
  • <'label'>: Literal argument. Requires the actual text label as input.
  • [shop]: Unless noted otherwise, requires you to either look at a shopkeeper, or specify a shopkeeper name, id, or unique id.
  • [player]: Unless noted otherwise, if no player is explicitly specified, the command affects the executing player.
  • [page]: Defaults to page 1 when not explicitly specified.

Commands

/shopkeeper help

Displays the available commands. Commands for which the player doesn't have the needed permission will be hidden.

/shopkeeper [shop-type] [object-type]

Creates an admin shopkeeper at the targeted block.
If creating player shops via command is enabled in the config, and no shop type is specified, and the executing player targets a container block (eg. a chest), this will create a player shopkeeper.

/shopkeeper reload

Reloads the plugin. This will save any unsaved changes and then reload the config file.

/shopkeeper notify <'trades'>

Toggles trade notifications on and off during the current game session.

/shopkeeper list [player|'admin'|'all'] [page]

Lists the player's own shops (if no player nor 'admin' is specified), the shops of a specified player, or all admin shops. The listing is divided into pages.

/shopkeeper remove [shop]

Removes the specified shopkeeper. You have to either look at the shop to remove, or specify its id, unique id, or name.

/shopkeeper removeAll [player|'player'|'admin']

Removes the player's own shops (if no argument is specified), the shops of a specified player, all player shops, or all admin shops. The command needs to be confirmed by the player via /shopkeeper confirm.

/shopkeeper give [player] [amount]

Gives the specified player the specified amount of shop creation items.

/shopkeeper giveCurrency [player] ['base'|'high'] [amount]

Gives the specified player the specified amount of currency items which have been defined inside the config.

/shopkeeper setCurrency ['base'|'high']

Sets the item of the specified currency to the item currently held in hand.

/shopkeeper remote [shop] [player]

Remotely opens the specified shop. The shop can be identified by name, id, unique id, or by looking at it. Optionally, and if the command executor has the shopkeeper.remote.otherplayers permission, the shop can also be opened for another player.

/shopkeeper edit [shop]

Allows editing shopkeepers remotely by targeting them, or by referencing them by their name, id or unique id.

/shopkeeper transfer <newOwner>

Transfers ownership of the targeted shopkeeper to another player.

/shopkeeper setTradePerm [shop] <permission|'-'|'?'>

Sets, removes (-), or displays (?) the trading permission of an admin shopkeeper. This trading permission will be required additionally to the general trading permission whenever a player tries to trade with the specified shopkeeper.
You can use any text you want as trading permission. For example, /shopkeeper setTradePerm Bob my.custom.permission will require players to have the permission my.custom.permission when they try to trade with the shopkeeper named Bob.

/shopkeeper setTradedCommand <command|'-'|'?'>

Sets, removes (-), or displays (?) the traded command assigned to the item that is currently held in the main hand.
Example: /shopkeeper setTradedCommand say Hello world!

See Selling Commands.

/shopkeeper setForHire [shop]

Sets the targeted player shopkeeper for sale. Hold the hiring cost in your hand and look at a shopkeeper or chest owned by a shopkeeper when you use this command. This will allow another player to pay the hiring cost and gain ownership of that shopkeeper.

/shopkeeper editVillager [villager]

Opens an editor to edit the specified villager or wandering trader. The villager / wandering trader can either be specified by uuid or by looking at it.

Shopkeeper Snapshot Commands

/shopkeeper snapshot list [shop] [page]

Lists the snapshots of a shopkeeper.

/shopkeeper snapshot create [shop] <name>

Creates a new shopkeeper snapshot with a given name. The name is not allowed to contain color codes or spaces.

/shopkeeper snapshot remove [shop] <name|id>

Removes a shopkeeper snapshot by name or id.

/shopkeeper snapshot restore [shop] <name|id>

Restores a shopkeeper snapshot by name or id.

Debugging and Auxiliary Commands

/shopkeeper confirm

Players are sometimes prompted to confirm a potentially dangerous action (such as when deleting all shops via command).

/shopkeeper replaceAllWithVanillaVillagers

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.

Mob equipment is not preserved, because vanilla villagers can drop their equipment in certain situations, which might not be intended.

This command requires all of the following permissions: shopkeeper.debug, shopkeeper.remove-all.player, shopkeeper.remove-all.admin

/shopkeeper cleanupCitizenShopkeepers

Removes all invalid Citizen shopkeepers. This are for example shopkeepers whose Citizens NPC no longer exists.

/shopkeeper convertItems [player] ['all']

This command can be used to convert the held (or all) items to conform to Spigot's internal item 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.

This can be used to manually fix individual items which cannot be traded due to not (or no longer) conforming to Spigot's internal item data format. See also the notes inside the config regarding the related convert-player-items setting.

On newer Spigot versions, this command may no longer have the original effect, because Spigot now persists the original format of text data of items (item display name, lore, etc.).

/shopkeeper debug [option]

Toggles the debug mode or a specific debug option on and off. The debug mode and debug options can also be set inside the config.

With debug mode enabled, the plugin logs additional information to the server console in various situations, which might help with troubleshooting issues.

/shopkeeper check

Prints statistics about the amount of loaded chunks, entities, loaded shopkeepers and the time spent for AI and gravity processing.

/shopkeeper debugCreateShops [shopCount|'testEquipment']

Creates shopkeepers for testing purposes.

  • Argument 'testEquipment' is specified: Creates a shopkeeper for each enabled mob type and applies a default equipment. This can be useful to test which equipment slots are supported by the individual mobs. The shopkeepers are spawned in one line, starting at the player's location, in the cardinal direction the player is facing, spaced by 2 blocks. The shopCount argument is ignored.
  • Otherwise: Creates the specified amount of admin shopkeepers (default: 10). This can be useful for performance testing. The shopkeepers are spawned in one line, starting at the player's location, in the cardinal direction the player is facing, spaced by 1 blocks.

/shopkeeper checkitem

Prints debug information about the held items and compares the items in main and off hand.

/shopkeeper yaml

Prints Bukkit's yaml serialization of the item held in hand, as well as its formatted item data for use inside the config. The output gets also logged to the console for easier copying (and because it is often too large for the in-game chat).

Note: The item's raw Minecraft NBT data can for example be inspected via Minecraft's own /data get entity @s command.

/shopkeeper testDamage [damage] [times-per-tick] [duration-ticks]

Can be used to debug the performance of handling lots of damage events.

/shopkeeper testSpawn [repetitions]

Measures the time it takes to respawn the active shopkeepers within the current chunk.

⚠️ **GitHub.com Fallback** ⚠️