/sendshowstoreoffer
原文:Commands/sendshowstoreoffer;源修订:3848097。
基岩版独有命令,需要开启作弊;权限等级为 4。发送请求,向玩家显示商店商品。
语法
sendshowstoreoffer <player: target> <redirectType: RedirectLocation> <offerId: string>
sendshowstoreoffer <player: target> server
参数
player: target:玩家目标选择器(CommandSelector<Player>)。
redirectType: RedirectLocation:指定跳转类型,值为 marketplace 或 character。
offerId: string:字符串,指定商品 ID。
结果
成功执行时,会向目标玩家的客户端发送网络请求,提示显示指定的商店页面。
| 成功条件 | 成功次数 | 输出 |
|---|---|---|
| 目标玩家在线,且商店请求成功发出 | 1 | 无 |
| 失败触发条件 | 错误消息 |
|---|---|
<player: target> 选择了非玩家实体或离线玩家 |
No targets matched selector |
| 从本地单人实例或客户端游戏会话执行 | Unknown command: sendshowstoreoffer. Please check that the command exists and that you have permission to use it. |
参考资料
Mojang bedrock-samples v1.20.80.5,metadata/command_modules/mojang-commands.json 第 15886 行(源页面历史部分的引用)。
外部链接
Microsoft Learn:/sendshowstoreoffer 命令(2024 年 8 月 1 日)。
来源为 Minecraft Wiki;本中文翻译/改编按 CC BY-NC-SA 3.0 共享。