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.
-
[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 argumentarg1
or argumentarg2
. -
<'label'>
: Literal argument. Requires the actual textlabel
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 page1
when not explicitly specified.
Displays the available commands. Commands for which the player doesn't have the needed permission will be hidden.
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.
Reloads the plugin. This will save any unsaved changes and then reload the config file.
Toggles trade notifications on and off during the current game session.
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.
Removes the specified shopkeeper. You have to either look at the shop to remove, or specify its id, unique id, or name.
The executing player requires editing rights for the target shopkeeper.
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
.
Gives the specified player the specified amount of shop creation items.
Gives the specified player the specified amount of currency items which have been defined inside the config.
Sets the item of the specified currency to the item currently held in hand.
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.
The executing player requires trading rights for the target shopkeeper, even when opening the shop for another player.
Allows editing shopkeepers remotely by targeting them, or by referencing them by their name, id or unique id.
The executing player requires editing rights for the target shopkeeper.
Transfers ownership of the targeted shopkeeper to another player.
The executing player requires editing rights for the target shopkeeper.
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
.
The executing player requires editing rights for the target shopkeeper.
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.
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.
The executing player requires editing rights for the target shopkeeper.
Teleports a player near the specified shopkeeper.
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.
The executing player requires trading rights for the target shopkeeper, even when opening the shop for another player.
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.
Lists the snapshots of a shopkeeper.
The executing player requires editing rights for the target shopkeeper.
Creates a new shopkeeper snapshot with a given name. The name is not allowed to contain color codes or spaces.
The executing player requires editing rights for the target shopkeeper.
Removes a shopkeeper snapshot by name or id.
The executing player requires editing rights for the target shopkeeper.
Restores a shopkeeper snapshot by name or id.
The executing player requires editing rights for the target shopkeeper.
Players are sometimes prompted to confirm a potentially dangerous action (such as when deleting all shops via 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.
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
Removes all invalid Citizen shopkeepers. This are for example shopkeepers whose Citizens NPC no longer exists.
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.).
Triggers third-party item updates.
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.
Prints statistics about the amount of loaded chunks, entities, loaded shopkeepers and the time spent for AI and gravity processing.
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. TheshopCount
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.
Prints debug information about the held items and compares the items in main and off hand.
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.
Can be used to debug the performance of handling lots of damage events.
Measures the time it takes to respawn the active shopkeepers within the current chunk.