Important security patch + instead of destroying shops by mining, click on the dark red chat message that appears when unlocking your shop.
- The admin command /function shop:uninstall will give a chat message that when pressed removes scoreboards and breaks all shop functionality, so you can remove the data pack without bloat to your world (consider making a backup and be careful who you hand admin permissions on your server).
- unneeded piece of data is now wiped after collecting profits
- new scoreboard: snt_total_profits
- stores the total amount of diamonds someone has ever made from their shops
/trigger view_shop_profit_scores_toggle
toggles being able to view those total profits on the sidebar
- line on the sign where the item is supposed to go can now be empty
- shop owner mode gets removed when no shop is nearby (which helps when destroying your shop)
- improvements to anti griefing system
see wiki for V2
Shopkeeper Guide
The Shopkeeper role in the Shop 'n Trade datapack allows players to create, manage, and maintain in-game shops efficiently. This guide provides detailed information on how to perform key actions, including setting up and managing shops, collecting profits, and handling inventory.
Shop Creation and Setup
Shops are automatically created when a player interacts with a sign placed on a chest, barrel, or shulker box. The sign must include the shop owner's name, the quantity of items available, and the pricing details. The item to be sold is determined based on the contents of the shop container, eliminating the need for manual item setup and simplifying the shop creation process.
When you walk into the sign, the system automatically detects and sets up the shop based on these details and the container's contents.
Sign format
1 | In-game username | Must be spelled exactly correctly. |
---|---|---|
2 | Amount | Number of items sold per batch; must strictly be a number on this line. |
3 | Item | The item sold is written on the sign automatically, make sure to have items in the shop first. |
4 | Price | The format of the price can be pretty loose, line must start with a number and then any letters can come after that. 0 means it's free. |
Example:
Managing the Shop
Once the shop is set up, the shopkeeper can manage it using a series of clicks on the shop sign. The first click on the shop sign unlocks the shop, allowing the shopkeeper to access and manage the inventory and settings. While the shop is unlocked, if any items in the container are changed, the shop automatically updates to reflect the new items. This feature ensures that the shop’s inventory remains accurate without requiring the shopkeeper to manually update the shop.
The second click on the shop sign allows the shopkeeper to collect profits and any waste items, which are items not intended for sale. This double-click mechanism simplifies the process of managing the shop’s earnings.
After collecting profits and managing the inventory, the shop can be relocked with a third click on the sign, which secures the shop from unauthorized access. The shop also automatically relocks when the shopkeeper leaves the area, further enhancing security.
Shop Maintenance and Notifications
Maintaining a shop involves regularly restocking items to ensure continuous operation. When the shop is unlocked, the shopkeeper can add new items to the container. If the stocked item in a shop's inventory is changed while the shop is unlocked, the system automatically updates the shop with the new item, ensuring the shop's inventory remains accurate.
If the shop runs out of stock, the buyer is notified. The system alerts the shopkeeper when they are online and not AFK. This notification feature is crucial for keeping the shop operational and ensuring that customers always have access to the items they wish to purchase.
Automated and Improved Systems
The datapack includes several automated systems designed to reduce manual intervention and improve shop management. Shops are created and updated automatically based on the items in the container, simplifying the process. The system also includes robust algorithms for validating items and stock levels, which automatically flag any invalid entries and put them in waste storage. A strict NBT data check is included in this validation. This ensures that shops operate smoothly and accurately.
Buying
Purchasing items is streamlined through a right-click purchase mechanism, where players can buy items by right-clicking the shop sign. If the item being sold contains additional NBT data, such as enchantments or nested items within a shulker box, the system provides a confirmation message with detailed information before completing the transaction, or cancelling it when the buyer moves away. This ensures that items with NBT data are accurately detected and processed, resulting in a reliable and transparent transaction experience. The NBT data should be intuitive to read, with a little critical thinking, but again, invalid entries are filtered out.
Security and Anti-Griefing Measures
To prevent griefing, players near a shop are automatically placed in Adventure mode, which prevents them from breaking or interacting with the shop in unintended ways. If a player becomes trapped due to this feature, they can escape using the /trigger trapped_in_shop
command. Shops are locked by default to prevent unauthorized access. When a shop owner clicks on their shop sign, the shop unlocks, allowing them to manage the shop in the ways detailed earlier.
Adapted to data pack version 18
Introducing "Shop 'n Trade" - Revolutionize your gameplay with the ultimate trading enhancement data pack. Immerse yourself in a dynamic trading experience that brings unprecedented convenience and security to your Minecraft world.
Players can create a shop by placing a sign on a (double) chest, barrel or shulker box and then doing /trigger make_shop_here to convert the structure into a shop. Players can right-click the sign to buy, and if the item sold has additional nbt data (like enchantments or items in a shulker box), a confirmation message will appear in chat with that information.
Sign Format:
- Shopkeeper's Name
- Quantity Available
- Item ID (Accessible via f3+H, without
minecraft:
) - Price in Diamonds*
*a number, followed by a space, followed by any spelling or shortening of the word 'diamonds'.
See gallery images for examples.
If a shop is empty, the player and the shop keep will get alerted, even when the shop keep is currently offline. The coordinates and specifications of the empty shop are also gives.
Shopkeepers are equipped with the power to effortlessly collect profits at any moment through the "/trigger collect_shop_profits" command. Additionally, assistance is just a command away with "/trigger shop_help".
Shops are protected against griefing, by putting players into adventure mode when near them. To avoid getting trapped by this feature, you can do /trigger trapped_in_shop
Introducing "Shop 'n Trade" - Revolutionize your gameplay with the ultimate trading enhancement data pack. Immerse yourself in a dynamic trading experience that brings unprecedented convenience and security to your Minecraft world.
Players can create a shop by placing a sign on a (double) chest, barrel or shulker box and then doing /trigger make_shop_here to convert the structure into a shop. Players can right-click the sign to buy, and if the item sold has additional nbt data (like enchantments or items in a shulker box), a confirmation message will appear in chat with that information.
Sign Format:
- Shopkeeper's Name
- Quantity Available
- Item ID (Accessible via f3+H, without
minecraft:
) - Price in Diamonds*
*a number, followed by a space, followed by any spelling or shortening of the word 'diamonds'.
See gallery images for examples.
If a shop is empty, the player and the shop keep will get alerted, even when the shop keep is currently offline. The coordinates and specifications of the empty shop are also gives.
Shopkeepers are equipped with the power to effortlessly collect profits at any moment through the "/trigger collect_shop_profits" command. Additionally, assistance is just a command away with "/trigger shop_help".
Shops are protected against griefing, by putting players into adventure mode when near them. To avoid getting trapped by this feature, you can do /trigger trapped_in_shop