Shop 'n Trade
Shop 'n Trade 数据包通过添加商店创建和管理功能,增强了游戏内的交易体验。作为店主,你可以利用简单且适合生存模式的功能高效地设置和管理你的商店。
商店创建与设置
要创建商店,请在箱子、 barrels(桶)或潜影盒上放置一块告示牌。告示牌必须包含商店所有者的用户名、可用物品数量以及价格详情。系统会自动检测并验证这些详情,并根据容器内容确定待售物品。这种设置无需手动配置物品。
当你走近告示牌时,系统会根据这些详情和容器内容自动检测并设置好商店。
告示牌格式:
- 1: 游戏内用户名(必须完全匹配)。
- 2: 数量(每批次出售的物品数)。
- 3: 物品(根据容器内容自动检测)。
- 4: 价格(以钻石为单位;以数字开头;后续字母可选;0 表示免费)。
示例:

管理商店
- 第一次点击:解锁商店,允许管理库存,甚至可以通过出现的红色聊天消息摧毁商店。任何容器内容的变化都会自动更新商店。
- 第二次点击:收取利润和废弃物品。
- 第三次点击:重新锁定商店,或者当店主离开区域时自动重新锁定。
商店维护与通知
在商店处于解锁状态时定期补货。系统会自动用新物品更新商店库存。如果商店缺货,系统会在店主在线且未闲置(AFK)时通知他们。计分板 snt_total_profits 存储某人从商店中获得的钻石总数。使用 /trigger view_shop_profit_scores_toggle 可以切换是否在侧边栏查看这些总利润。
自动化系统
商店和库存会根据容器内容自动创建和更新。系统对物品和库存水平进行了严格的验证,过滤掉无效条目并执行 NBT 数据检查,以确保平稳运行。
购买
玩家通过右键点击商店告示牌来购买商品。对于具有 NBT 数据的物品,在完成交易之前会提供带有详细信息的确认消息,确保准确透明的购买过程。
安全与防破坏
靠近商店的玩家会被置于冒险模式,以防止意外交互。如果被困,请使用 /trigger trapped_in_shop 命令逃脱。商店默认处于锁定状态;所有者可以通过点击告示牌解锁商店进行管理。
游戏内帮助
在游戏中运行 /trigger shop_help 将在聊天中显示指南,并提供指向完整 wiki 页面 的链接。
管理员命令 /function shop:uninstall 会发送一条聊天消息,点击该消息将移除计分板并破坏所有商店功能,从而让你在不留下冗余数据的情况下移除该数据包(建议先备份,并谨慎分配服务器的管理员权限)。
注意
- 如果你想支持像我这样的小型创作者,请关闭广告拦截器。
- 访问我的主页查看更多作品:
- 请点击链接访问完整的 wiki 和问题反馈页面,请务必详细描述遇到的问题
请记住:
- 确保你熟悉安装数据包的方法。
- 验证与你使用的 Minecraft 版本的兼容性。
使用条款:
做:
- 出于私人用途使用和修改此数据包。
- 在公共场合(如视频展示)使用该数据包,或对原始材料进行修改再分发时,请注明作者(ThijquintNL)。
不做:
依据 CC-BY-NC-SA 4.0 许可证
Shop 'n Trade
The Shop 'n Trade datapack upgrades in-game trading by adding a way for shop creation and management. As a shopkeeper, you can efficiently set up and manage your shops with easy, survival-oriented features.
Shop Creation and Setup
To create a shop, place a sign 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 system automatically detects and validates these details, determining the item to be sold based on the container’s contents. This setup eliminates the need for manual item configuration.
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 exact).
- 2: Amount (number of items sold per batch).
- 3: Item (automatically detected based on container).
- 4: Price (in diamonds; starts with a number; additional letters optional; 0 means free).
Example:

Managing the Shop
- First Click: Unlocks the shop, allowing inventory management or even destroying the shop with the red chat message that appears. The shop updates automatically with any changes in the container.
- Second Click: Collects profits and waste items.
- Third Click: Relocks the shop, or it auto-relocks when the shopkeeper leaves the area.
Shop Maintenance and Notifications
Regularly restock items while the shop is unlocked. The system automatically updates the shop’s inventory with new items. If the shop runs out of stock, the shopkeeper is notified when online and not AFK. The 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.
Automated Systems
Shops and inventories are automatically created and updated based on container contents. The system includes robust validation for items and stock levels, filtering out invalid entries and performing NBT data checks to ensure smooth operation.
Buying
Players purchase items by right-clicking the shop sign. For items with NBT data, a confirmation message with detailed information is provided before completing the transaction, ensuring accurate and transparent purchases.
Security and Anti-Griefing
Players near a shop are placed in Adventure mode to prevent unintended interactions. If trapped, use the /trigger trapped_in_shop command to escape. Shops are locked by default; the shop owner can unlock the shop by clicking the sign to manage it.
In-game help
running /trigger shop_help in-game will show a guide in chat with a link to the full wiki page.
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).
notice
- If you want to support small creators like me, you can turn off ad blocker.
- Check out my profile for more creations:
- Follow the link to the full wiki and issues pages, please report issues with detail
Keep in mind:
- Ensure you're familiar with installing data packs.
Verify compatibility with your Minecraft version.
Terms of use:
Do:
- Use and modify the data pack for private use.
- Credit me (ThijquintNL) as the creator when using the data pack in public, such as in video showcases, or when editing and redistributing the original material.
Don't:
- Redistribute the data pack for commercial purposes.
Under CC-BY-NC-SA 4.0 license
评论 0
登录后参与评分
还没有评论,来抢沙发吧