Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Ultimateshops Plugin Wiki › Guides › Execute Commands When Players Buy or Sell

Execute Commands When Players Buy or Sell

Adding Buy and Sell Commands

You can trigger custom commands when players interact with your shop. Stand near your shop and use:

`

/ushop addBuyCommand COMMAND

/ushop addSellCommand COMMAND

`

Do not include the forward slash (/). For example: addBuyCommand give @p diamond 1 will give the buyer a diamond when they purchase from your shop.

Viewing and Removing Commands

List all commands attached to your shop with /ushop listBuyCommands and /ushop listSellCommands. Each command has an index number. Remove a specific command using /ushop removeBuyCommand INDEX or /ushop removeSellCommand INDEX.

To clear all commands at once, use /ushop clearBuyCommands, /ushop clearSellCommands, or /ushop clearCommands to remove everything. This feature is useful for giving rewards, triggering announcements, or integrating with other plugins.