|
1 | | -前置插件:PacketEvents |
| 1 | +下载请点右边的release |
| 2 | +前置插件:PacketEvents(必须), MythicMobs(可选), PlaceholderAPI(可选) |
2 | 3 |
|
3 | 4 | 模仿原版药水机制的自定义药水插件,添加了一些药水效果: |
4 | 5 | - 愤怒(Anger): 每次攻击添加`等级`层`活力`效果 |
|
31 | 32 |
|
32 | 33 | 来源可为玩家名或UUID |
33 | 34 |
|
| 35 | +PAPI变量: |
| 36 | +%custompotion_<玩家名/实体UUID/me>_<药水ID>_<duration/level/multiplier/display/displayname/source/sourceuuid>% |
| 37 | +me代表解析自己,玩家名支持下划线,做了专门处理 |
| 38 | +duration获取的是药水剩余时间(刻) |
| 39 | +level和multiplier获取的都是药水等级 |
| 40 | +display和displayname获取的都是药水显示名 |
| 41 | +source获取的是来源实体显示名 |
| 42 | +sourceuuid获取的是来源实体uuid |
| 43 | + |
| 44 | +配置文件: |
| 45 | +config.yml: |
| 46 | +```yaml |
| 47 | +#Do message returned by command respect the sendCommandFeedback gamerule? |
| 48 | +#命令返回的消息是否遵从sendCommandFeedback游戏规则? |
| 49 | +respect_gamerule: true |
| 50 | +``` |
| 51 | +
|
| 52 | +message.yml: |
| 53 | +```yaml |
| 54 | +message: |
| 55 | + command: |
| 56 | + unknown_subcommand: "<red>未知子命令: %command%" |
| 57 | + unknown_effect: "<red>未知效果: %type%" |
| 58 | + invalid_number: "<red>等级和时长需要为有效整数" |
| 59 | + invalid_argument: "<red>无效参数" |
| 60 | + invalid_stacking_mode: "<red>无效的叠加状态,可用状态有: NORMAL, REPLACE, ADD_ALL, ADD_TIME, ADD_AMPLIFIER" |
| 61 | + 0_args: "使用方法: /customeffect <modify|clear> ..." |
| 62 | + clear_2_args: "使用方法: /customeffect clear <UUID/玩家名> [类型]" |
| 63 | + modify_3_args_1: "使用方法: /customeffect modify <UUID/玩家名> <类型> [时长] [等级] [叠加状态/来源]" |
| 64 | + modify_3_args_2: "使用方法: /customeffect modify <UUID/玩家名> <类型> [时长] [等级] [叠加状态] [来源]" |
| 65 | + level_lower_than_0: "<red>等级需要大于0" |
| 66 | + duration_lower_than_0: "<red>时长需要大于0" |
| 67 | + not_found: "<red>未找到对应玩家或实体" |
| 68 | + applied: "已将%level%级%type%效果应用于%name%,持续%duration%刻" |
| 69 | + cleared: "已清除%name%的%type%效果" |
| 70 | + cleared_all: "已清除%name%的所有效果" |
| 71 | + |
| 72 | +display-names: |
| 73 | + anger: "愤怒" |
| 74 | + combust: "内燃" |
| 75 | + death: "终焉" |
| 76 | + lightning: "雷霆" |
| 77 | + moonshine: "月华" |
| 78 | + poison: "剧毒" |
| 79 | + reflection: "反射" |
| 80 | + revealing: "破隐" |
| 81 | + reverse: "逆转" |
| 82 | + sacrifice: "血祭" |
| 83 | + shield: "护盾" |
| 84 | + spin: "旋转" |
| 85 | + sunshine: "晴光" |
| 86 | + taunt: "嘲讽" |
| 87 | + vigor: "活力" |
| 88 | +``` |
| 89 | +
|
| 90 | +API: |
| 91 | +- 事件: |
| 92 | + - CustomPotionAddEvent |
| 93 | + - CustomPotionApplyEvent |
| 94 | + - CustomPotionRemoveEvent |
| 95 | +- 管理类: |
| 96 | + - DatabaseManager: 用于管理玩家下线时储存的药水效果 |
| 97 | + - PotionManager: 用于管理药水效果的添加/删除/生效等 |
| 98 | +具体方法等见源代码 |
| 99 | +
|
34 | 100 | 本来打算添加更多药水效果(大概66种),不过由于将要使其兼容我自己的属性插件,要大改代码,就不继续更新新效果了,如果你有开发经验添加自定义效果应该很容易,你可以自己添加 |
0 commit comments