玩家
仅列出与当前功能相关参数,更多详见完整配置
左键
yaml
# 左键、左键+SHIFT
type: left,left-shift右键
yaml
# 右键、右键+SHIFT、右键实体、右键实体+SHIFT
type: right,right-shift,right-entity,right-entity-shift方块交互
yaml
type: right
# 格式: 世界名,x,y,z
# 范围: world,-24~-50,60~64,0~5
position: world,-24,64,-1
action:
- 消息('触发成功,方块类型 {block-type}')区域
yaml
进入区域:
type: region
region: world,3~10,59~65,-20~-2
action:
- 消息('&a已进入区域')
离开区域:
type: region-end
region: world,3~10,59~65,-20~-2
action:
- 消息('&a已离开区域')潜行
yaml
# 潜行、潜行结束
type: sneak,sneak-end奔跑
yaml
# 奔跑、奔跑结束
type: sprint,sprint-end跳跃
yaml
type: jump移动
yaml
type: move滑翔
开启或关闭鞘翅滑翔时触发
yaml
# 滑翔、滑翔结束
type: glide,glide-end骑乘
骑乘坐骑,比如马、船、矿车、猪等触发
yaml
# 骑乘、骑乘结束
type: ride,ride-end飞行
yaml
# 飞行、飞行结束
type: fly,fly-end传送
yaml
type: teleport世界变更
- 相关事件无法被取消
yaml
type: world-change战斗状态
yaml
# 战斗状态,战斗脱离
type: combat,combat-end玩家攻击
yaml
type: attack玩家受击
yaml
type: defense玩家死亡
yaml
type: death玩家重生
yaml
type: respawn击杀实体
yaml
type: kill-entity击杀玩家
yaml
type: kill-player
action:
- 物品展示('{prefix}&7玩家 &f{entity-name} &7被 &f%player_name% &7使用 ${获取物品名()} &7击杀')方块破坏
yaml
type: block-break
# 方块条件
block:
- DIAMOND_ORE
# 额外掉落物
drop:
- "mc APPLE 1"
# 清除原掉落物
clear-drops: false变量
| 说明 | 变量 |
|---|---|
| 方块类型 | {block-type} |
方块放置
yaml
type: block-place
position: world,0~25,0~255,20~50
action:
- 消息('{prefix}&7禁止放置')
cancel: true变量
| 说明 | 变量 |
|---|---|
| 方块类型 | {block-type} |
方块施肥 1.13
对方块施肥(促使其成长)时触发
yaml
type: block-fertilize变量
| 说明 | 变量 |
|---|---|
| 方块类型 | {block-type} |
物品拾取
yaml
type: pickup物品丢弃
yaml
type: drop物品消耗
在玩家成功吃下或喝下可食用物品时触发,如食物、药水、牛奶等
yaml
type: consume物品合成
yaml
type: craft
condition:
- match.type('HOPPER')
action:
- 消息('{prefix}&7禁止合成')
cancel: true附魔台
yaml
type: enchant
action:
- 消息('{prefix}&7禁止使用附魔台')
cancel: true铁砧
yaml
type: anvil
action:
- 消息('{prefix}&7禁止使用铁砧')
cancel: true执行指令
yaml
type: command变量
| 说明 | 变量 |
|---|---|
| 指令 | {command} |
玩家聊天
yaml
type: chat变量
| 说明 | 变量 |
|---|---|
| 消息 | {message} |
玩家钓鱼
yaml
type: fish
condition:
- "'{entity-type}' == 'PLAYER'"
action:
- 消息('{prefix}&7禁止玩家使用钓竿钓玩家')
cancel: true变量
| 说明 | 变量 |
|---|---|
| 钓鱼状态 | {state} |
登录游戏
yaml
type: login进入游戏
yaml
type: join退出游戏
yaml
type: quit打开GUI
yaml
# GUI打开、关闭
type: inventory-open,inventory-close变量
| 说明 | 变量 |
|---|---|
| 标题 | {inventory-title} |
| 类型 | {inventory-type} |
点击GUI
yaml
type: inventory-click变量
| 说明 | 变量 |
|---|---|
| 标题 | {inventory-title} |
| 类型 | {inventory-type} |
| 点击类型 | {click-type} |
| 动作类型 | {action-type} |
切换副手
使用 F键 切换主副手时触发
yaml
type: swap-hand盔甲变更 Paper
玩家穿戴或脱下头盔、胸甲、护腿、靴子时触发
- 相关事件无法被取消
yaml
type: armor-change盔甲架
玩家操作(交互)盔甲架时触发
yaml
type: armor-stand