- 版权类型
- 原创
- 插件中文名称
- 生命指令
- 插件英文名称
- LifeCommand
- 原帖地址
- #
- 支持的核心(服务端)
- Spigot
- Paper
- Purpur
- 其他核心
- 语言支持
- 中文(简体)
- 前置组件
- #
- 适配版本(Java)
- 1.21
- 1.20
- 1.19
- 1.18
- 1.17
- 1.16
配置文件
代码:
# LifeCommand 插件配置文件
# 当玩家生命值低于指定阈值时自动执行预设指令
# 全局设置
global:
# 是否启用插件
enabled: true
# 检测间隔 (tick, 20 tick = 1秒)
check-interval: 20
# 是否启用异步指令执行
async-execution: true
# 日志设置
logging:
# 日志级别: INFO, WARNING, ERROR, DEBUG
level: INFO
# 是否记录指令执行
log-command-execution: true
# 是否记录玩家生命值变化
log-health-changes: false
# 默认世界配置 (当世界没有单独配置时使用)
default-world:
# 是否启用生命值检测
enabled: true
# 生命值阈值 (当玩家生命值 <= 此值时触发)
health-threshold: 4.0
# 冷却时间 (秒) - 防止频繁触发
cooldown: 30
# 要执行的指令列表
commands:
- command: "heal %player%"
# 执行权限: PLAYER(玩家), OP(管理员), CONSOLE(控制台)
permission: "CONSOLE"
# 指令描述
description: "治疗玩家"
- command: "tell %player% 你的生命值过低,已自动治疗!"
permission: "CONSOLE"
description: "提醒玩家"
# 世界特定配置
worlds:
# 示例:主世界配置
world:
enabled: true
health-threshold: 6.0
cooldown: 60
commands:
- command: "heal %player%"
permission: "CONSOLE"
description: "主世界治疗"
- command: "give %player% golden_apple 1"
permission: "CONSOLE"
description: "给予金苹果"
# 示例:地狱配置
world_nether:
enabled: true
health-threshold: 2.0
cooldown: 15
commands:
- command: "tp %player% 0 64 0"
permission: "CONSOLE"
description: "传送到安全地点"
- command: "heal %player%"
permission: "CONSOLE"
description: "地狱紧急治疗"
# 示例:末地配置
world_the_end:
enabled: false
health-threshold: 8.0
cooldown: 45
commands:
- command: "heal %player%"
permission: "OP"
description: "末地治疗"
# 玩家黑名单 (这些玩家不会触发生命值检测)
blacklist:
- "ExamplePlayer1"
- "ExamplePlayer2"
# 可用的占位符:
# %player% - 玩家名称
# %world% - 世界名称
# %health% - 当前生命值
# %max_health% - 最大生命值
# %threshold% - 触发阈值