命令与权限
主命令
插件提供一个主命令 /emcitem,别名 /ei 和 /emci。
子命令一览
| 命令 | 说明 | 权限 |
|---|---|---|
/emcitem give <玩家> <来源:物品ID> [数量] | 给予玩家指定物品 | emcitem.give |
/emcitem list [来源] | 列出物品(可按来源筛选) | emcitem.list |
/emcitem sources | 查看所有物品源状态 | emcitem.sources |
/emcitem reload | 重新加载所有配置和物品源 | emcitem.reload |
命令详解
give — 给予物品
/emcitem give <玩家> <来源:物品ID> [数量]
- 玩家:目标玩家名(必须在线)
- 来源:物品ID:完整物品标识符,如
config:example_sword、mythicmobs:SkeletonKingSword - 数量:1~64,默认 1
示例:
/emcitem give Steve config:example_sword 1
/emcitem give Alex mythicmobs:SkeletonKingSword 3
/emcitem give Notch mmoitems:SWORD.EXCALIBUR
若玩家背包已满,多余物品会掉落在脚下。
list — 列出物品
/emcitem list [来源]
- 不指定来源:列出所有物品源的全部物品(带
来源:物品ID前缀) - 指定来源:仅列出该来源下的物品
示例:
/emcitem list → 列出全部
/emcitem list config → 仅列出配置文件物品
/emcitem list mythicmobs → 仅列出 MythicMobs 物品
sources — 查看物品源状态
/emcitem sources
输出所有已注册物品源的可用状态(✔ 可用 / ✘ 不可用)。
reload — 重载配置
/emcitem reload
重新加载 config.yml 和 items/ 目录下的所有物品定义文件。
权限节点
| 权限 | 说明 | 默认 |
|---|---|---|
emcitem.give | 允许使用 give 子命令给予物品 | OP |
emcitem.list | 允许使用 list 子命令查看物品列表 | OP |
emcitem.sources | 允许使用 sources 子命令查看物品源状态 | OP |
emcitem.reload | 允许使用 reload 子命令重载配置 | OP |
Tab 补全
命令支持智能 Tab 补全:
- 第一层补全子命令:
give、list、sources、reload give第二层补全在线玩家名give第三层补全所有可用的来源:物品IDlist第二层补全物品源名称