检查动作
检查动作(Check Actions)用于在法术执行前验证条件。
检查类型
实体检查
- is_alive — 是否存活
- is_player — 是否为玩家
- is_monster — 是否为怪物
- has_effect — 是否有药水效果
- health — 生命值检查
- distance — 距离检查
位置检查
- is_air — 是否在空中
- is_solid — 是否为实体方块
- is_water — 是否在水中
- is_lava — 是否在岩浆中
- has_sky — 是否能看到天空
玩家检查
- has_permission — 是否有权限
- has_item — 是否有物品
- gamemode — 游戏模式
- is_sneaking — 是否潜行
- is_sprinting — 是否疾跑
配置示例
checks:
- type: is_player
- type: has_permission
permission: magic.spell.fireball
- type: distance
max: 30
检查失败时法术不会执行。