插件前置
DragonCore
插件讲解
1.支持给玩家召唤一个或者多个光环
2.光环支持多种动态效果,如 位移、旋转、缩放,并且效果可镶套叠加
3.光环支持自定义周期和自定义位置角度设计,极大的灵活性
4.支持按权限解锁光环的使用权限
配置详情
提供多种默认动画可供开箱使用
# ==================== QyHalo 光环系统配置文件 ====================
# 插件版本:1.0.0
# 作者:QyHalo
# 依赖:DragonCore
# ==================== 数据存储配置 ====================
storage:
# 存储类型:local(本地YAML)或 mysql(MySQL数据库)
type: "local"
# MySQL 配置(仅当 type 为 mysql 时生效)
mysql:
host: "localhost"
port: 3306
database: "minecraft"
username: "root"
password: "password"
table-prefix: "qyhalo_"
# 连接池配置
pool:
maximum-pool-size: 10
minimum-idle: 2
connection-timeout: 30000
# ==================== 消息配置 ====================
messages:
prefix: "§7[§6清影光环§7] §r"
halo-set: "§a已切换光环为:%halo%"
halo-off: "§c已关闭光环"
halo-no-permission: "§c你没有权限使用此光环!"
halo-not-found: "§c光环 §e%halo% §c不存在!"
halo-list-header: "§6========== 可用光环 =========="
halo-list-item: "§e%id% §7- %name% %status%"
halo-list-locked: "§c[已锁定]"
halo-list-unlocked: "§a[已解锁]"
reload-success: "§a配置已重载!"
reload-failed: "§c配置重载失败:%error%"
# ==================== 光环配置 ====================
halos:
# ==================== 示例1:默认的脚底静态光环 ====================
# 最基础的光环效果,水平放置在玩家脚下,无任何动画
# 适合作为默认光环或测试用途
example_1_static:
display-name: "§f静态光环"
texture: "halos/static_circle.png"
offset:
x: 0.0 # 居中
y: 0.1 # 脚底上方 0.1 格,避免与地面重叠
z: 0.0 # 居中
rotation:
x: 90.0 # 水平放置(俯视角度)
y: 0.0
z: 0.0
size:
width: 2.0 # 宽度 2 格
height: 2.0 # 高度 2 格
alpha: 1.0 # 完全不透明
glow: false # 不发光
distance: 64.0 # 64 格渲染距离
render-on-first: true # 第一人称可见
permission: "" # 无权限要求
animations: [] # 无动画
# ==================== 示例2:从脚下缩放展开到完整形态的静态光环 ====================
# 光环从 0 缩放到正常大小后保持静止
# 适合作为玩家登录时的欢迎特效
example_2_expand_once:
display-name: "§a展开光环"
texture: "halos/expand_circle.png"
offset:
x: 0.0
y: 0.1
z: 0.0
rotation:
x: 90.0
y: 0.0
z: 0.0
size:
width: 2.5
height: 2.5
alpha: 1.0
glow: true # 发光效果
distance: 64.0
render-on-first: true
permission: "qyhalo.expand"
animations:
- type: "scale"
delay: 0
from-scale: 0.0 # 从 0 开始(完全缩小)
to-scale: 1.0 # 展开到正常大小
duration: 1000 # 1 秒展开(1000 毫秒)
cycle-count: 1 # 只播放一次
fixed: false
reset-time: 0
# ==================== 示例3:像水波一样循环缩放展开的光环 ====================
# 光环持续在 0.8 到 1.2 倍大小之间循环缩放
# 模拟水波纹的呼吸效果
example_3_wave_pulse:
display-name: "§b水波光环"
texture: "halos/wave_circle.png"
offset:
x: 0.0
y: 0.1
z: 0.0
rotation:
x: 90.0
y: 0.0
z: 0.0
size:
width: 2.0
height: 2.0
alpha: 0.8 # 半透明效果
glow: true
distance: 64.0
render-on-first: true
permission: "qyhalo.wave"
animations:
- type: "scale"
delay: 0
from-scale: 0.8 # 最小 0.8 倍
to-scale: 1.2 # 最大 1.2 倍
duration: 1500 # 1.5 秒一个周期(1500 毫秒)
cycle-count: -1 # 无限循环
fixed: false
reset-time: 0
# ==================== 示例4:在玩家背后 0.5 格的光环 ====================
# 光环垂直放置在玩家背后,像翅膀或背景装饰
# 注意:x 轴负值表示后方,z 轴负值表示左侧
example_4_back_static:
display-name: "§e背部光环"
texture: "halos/back_circle.png"
offset:
x: 0.0 # 左右居中
y: 1.0 # 腰部高度
z: -0.5 # 背后 0.5 格(负值=后方)
rotation:
x: 0.0 # 垂直放置(不旋转)
y: 0.0
z: 0.0
size:
width: 1.5
height: 1.5
alpha: 1.0
glow: true
distance: 64.0
render-on-first: false # 第一人称不可见(避免遮挡视野)
permission: "qyhalo.back"
animations: []
# ==================== 示例5:在玩家背后 0.5 格 360 度旋转的光环 ====================
# 光环在玩家背后垂直旋转,像光轮或能量环
# 适合作为高级玩家的特效
example_5_back_rotate:
display-name: "§6旋转背环"
texture: "halos/rotating_back.png"
offset:
x: 0.0 # 左右居中
y: 1.0 # 腰部高度
z: -0.5 # 背后 0.5 格(负值=后方)
rotation:
x: 0.0 # 垂直放置
y: 0.0
z: 0.0
size:
width: 2.0
height: 2.0
alpha: 1.0
glow: true
distance: 64.0
render-on-first: false
permission: "qyhalo.backrotate"
animations:
- type: "rotate"
direction: "z" # 绕 z 轴旋转(水平旋转)
delay: 0
angle: -360.0 # 旋转 360 度
duration: 3000 # 3 秒一圈(3000 毫秒)
cycle-count: -1 # 无限循环
fixed: false
reset-time: 0
# ==================== 示例6:在玩家脚下一层层展开的多层贴图光环(3层示例)====================
# 三层光环从内到外依次展开,每层有不同的延迟
# 适合作为召唤法阵或传送特效
example_6_multi_expand:
display-name: "§d§l三重展开"
layers:
# 第一层(内环)- 立即展开
- texture: "halos/layer_1_inner.png"
offset:
x: 0.0
y: 0.1
z: 0.0
rotation:
x: 90.0 # 水平放置
y: 0.0
z: 0.0
size:
width: 1.5 # 最小尺寸
height: 1.5
alpha: 1.0
glow: true
animations:
- type: "scale"
delay: 0 # 无延迟,立即开始
from-scale: 0.0
to-scale: 1.0
duration: 750 # 0.75 秒展开(750 毫秒)
cycle-count: 1 # 只播放一次
fixed: false
reset-time: 0
# 第二层(中环)- 延迟 500 毫秒后展开
- texture: "halos/layer_2_middle.png"
offset:
x: 0.0
y: 0.15 # 稍微高一点,避免重叠
z: 0.0
rotation:
x: 90.0
y: 0.0
z: 0.0
size:
width: 2.5 # 中等尺寸
height: 2.5
alpha: 0.9
glow: true
animations:
- type: "scale"
delay: 0 # 无延迟,立即开始
from-scale: 0.0
to-scale: 0.0
duration: 510 # 0.5 秒展开(500 毫秒) 防止光环出现一闪而逝的情况 建议多10毫秒
cycle-count: 1 # 只播放一次
fixed: false
reset-time: 0
- type: "scale"
delay: 500 # 延迟 0.5 秒(500 毫秒)
from-scale: 0.0
to-scale: 1.0
duration: 750 # 0.75 秒展开(750 毫秒)
cycle-count: 1
fixed: false
reset-time: 0
# 第三层(外环)- 延迟 1000 毫秒后展开
- texture: "halos/layer_3_outer.png"
offset:
x: 0.0
y: 0.2 # 最高层
z: 0.0
rotation:
x: 90.0
y: 0.0
z: 0.0
size:
width: 3.5 # 最大尺寸
height: 3.5
alpha: 0.8
glow: true
animations:
- type: "scale"
delay: 0 # 无延迟,立即开始
from-scale: 0.0
to-scale: 0.0
duration: 1010 # 1 秒展开(1000 毫秒) 防止光环出现一闪而逝的情况 建议多10毫秒
cycle-count: 1 # 只播放一次
fixed: false
reset-time: 0
- type: "scale"
delay: 1000 # 延迟 1 秒(1000 毫秒)
from-scale: 0.0
to-scale: 1.0
duration: 750 # 0.75 秒展开(750 毫秒)
cycle-count: 1
fixed: false
reset-time: 0
distance: 64.0
render-on-first: true
permission: "qyhalo.multiexpand"
# ==================== 示例7:从玩家头上分批次出现然后降落到地面的多层光环(3层示例)====================
# 三层光环从头顶依次出现,然后下降到脚底
# 适合作为升级特效或成就解锁动画
example_7_falling_rings:
display-name: "§c§l天降光环"
layers:
# 第一层 - 从头顶 2 格处下降
- texture: "halos/falling_1.png"
offset:
x: 0.0
y: 2.0
z: 0.0
rotation:
x: 90.0
y: 0.0
z: 0.0
size:
width: 2.0
height: 2.0
alpha: 1.0
glow: true
animations:
- type: "rotate"
direction: "z"
delay: 0
angle: 360.0
duration: 1500
cycle-count: 1
fixed: false
reset-time: 0
- type: "translate"
delay: 0
direction: "z" # 移动轴向:x(前后)、y(上下)、z(左右) 因为你上面旋转了x90° 那么这里不是填y 而是填z
distance: 1.93 # 移动距离(方块单位)从2减少1.93 所以最后会在脚下0.07的位置
duration: 1500 # 持续时间(毫秒)
cycle-count: 1
fixed: true
reset-time: 0
# 第二层 - 从头顶 2 格处下降
- texture: "halos/falling_2.png"
offset:
x: 0.0
y: 2.0
z: 0.0
rotation:
x: 90.0
y: 0.0
z: 0.0
size:
width: 3.0
height: 3.0
alpha: 1.0
glow: true
animations:
- type: "scale"
delay: 0
from-scale: 0.0
to-scale: 0.0
duration: 510
cycle-count: 1
fixed: false
reset-time: 0
- type: "scale"
delay: 500
from-scale: 0.0
to-scale: 1.0
duration: 1500
cycle-count: 1
fixed: false
reset-time: 0
- type: "rotate"
direction: "z"
delay: 500
angle: 360.0
duration: 1500
cycle-count: 1
fixed: false
reset-time: 0
- type: "translate"
delay: 500
direction: "z" # 移动轴向:x(前后)、y(上下)、z(左右)
distance: 1.93 # 移动距离(方块单位)
duration: 1500 # 持续时间(毫秒)
cycle-count: 1
fixed: true
reset-time: 0
# 第三层 - 从头顶 2 格处下降
- texture: "halos/falling_3.png"
offset:
x: 0.0
y: 2.0
z: 0.0
rotation:
x: 90.0
y: 0.0
z: 0.0
size:
width: 4.0
height: 4.0
alpha: 1.0
glow: true
animations:
- type: "scale"
delay: 0
from-scale: 0.0
to-scale: 0.0
duration: 1010
cycle-count: 1
fixed: false
reset-time: 0
- type: "scale"
delay: 1000
from-scale: 0.0
to-scale: 1.0
duration: 1500
cycle-count: 1
fixed: false
reset-time: 0
- type: "rotate"
direction: "z"
delay: 1000
angle: 360.0
duration: 1500
cycle-count: 1
fixed: false
reset-time: 0
- type: "translate"
delay: 1000
direction: "z" # 移动轴向:x(前后)、y(上下)、z(左右)
distance: 1.93 # 移动距离(方块单位)
duration: 1500 # 持续时间(毫秒)
cycle-count: 1
fixed: true
reset-time: 0
distance: 64.0
render-on-first: true
permission: "qyhalo.falling"
旋转动画 (rotate)
animations:
- type: "rotate"
direction: "y" # 旋转轴: x(俯仰), y(偏航), z(翻滚)
angle: 360.0 # 旋转角度(正值=顺时针,负值=逆时针)
缩放动画 (scale)
animations:
- type: "scale"
from-scale: 0.8 # 起始缩放(0.0 = 完全缩小,1.0 = 原始大小)
to-scale: 1.2 # 结束缩放(大于1.0 = 放大)
位移动画 (translate)
animations:
- type: "translate"
direction: "y" # 移动轴向: x(左右), y(上下), z(前后) 注意: 受到rotation旋转节点影响
distance: 1.5 # 移动距离(方块单位,正值/负值表示方向)
bind-entity: true # 是否绑定实体(跟随玩家移动)(默认true)
动作通用参数
| 参数 | 类型 | 说明 | 默认值 |
|---|---|---|---|
type |
String | 动画类型:rotate、scale、translate |
rotate |
delay |
int | 延迟时间(毫秒),动画开始前的等待时间 | 0 |
duration |
int | 持续时间(毫秒),动画执行的时长 | 0 |
cycle-count |
int | 循环次数,-1 表示无限循环,1 表示播放一次 |
0 |
fixed |
boolean | 是否固定(建议位移动画设为 true) |
false |
reset-time |
int | 重置时间(毫秒),动画结束后的重置延迟 | 0 |
指令说明
| 指令 | 描述 | 权限 |
|---|---|---|
/qyhalo list |
列出所有可用光环 | 无 |
/qyhalo set <光环ID> [玩家] |
为自己或其他玩家设置光环 | 对应光环权限 / qyhalo.admin |
/qyhalo off [玩家] |
关闭自己或其他玩家的光环 | 无 / qyhalo.admin |
/qyhalo info [玩家] |
查看自己或其他玩家的光环信息 | 无 |
/qyhalo reload |
重载插件配置 | qyhalo.admin |
指令别名: /halo, /guanghuan
说明:
- 普通玩家只能操作自己的光环
- 拥有
qyhalo.admin权限的管理员可以操作其他玩家的光环 - Tab 补全会智能显示玩家有权限的光环
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END


