? DiscordSRV Ultimate 添加了:
- 用于使文本加粗、下划线、斜体或小大写的专属占位符
- 来自 DiscordSRV 和 PlaceholderAPI 的后处理占位符
- 与其他工具配合实现渐变的 ability
注意: 如果你正在使用我的模组,请不要购买 Minecraft。
? 依赖项(必须安装)
ℹ️ 信息
- ⚠️ 该插件在非 Paper Bukkit 分支上无法运行!
- 没有 GitHub 仓库,但项目未混淆,你可以自由反编译它。
- 该插件采用 CC-BY-NC 4.0 许可证授权,但你不需要署名。
? 用法
DiscordSRV Ultimate 通过后处理输出来扩展 DiscordToChatMessage 格式(DiscordToMinecraftChatMessageFormat 和 DiscordToMinecraftChatMessageFormatNoRole 字段)的可能性。例如,要使角色名显示为渐变色,你可以这样使用:
[[gradient_message_$[[toprolecolor]]_#000000_[[toprolealias]]]]&8 » &7%name%%reply%:&f %message%
这个示例看起来可能有点复杂,但它的作用是:
- 获取用户最高角色的别名
- 从用户角色颜色(由
§x§r§r§g§g§b§b 转换为 #rrggbb)到 #000000 创建渐变效果
为了让它正常工作,你还必须安装 Gradient PAPI 扩展:
/papi ecloud download Gradient
/papi reload
该插件将 [[ 和 ]] 替换为 %,因为如果直接使用 %,它会在预处理阶段被解析。为什么我要进行后处理?因为我不知道如何在预处理阶段完成所有这些操作(DiscordSRV 的事件……很奇怪)。
如前所述,$§x§r§r§g§g§b§b 会转换为 #rrggbb。这是为了让渐变(和其他颜色操作)正常工作。
? 合并
如果你想混合某些功能,例如小写和大写以及渐变,你需要为此使用 Utils PAPI 扩展。安装也非常简单:
/papi ecloud download Utils
/papi reload
用法则……有点复杂:
[[utils_parse_gradient_message_$[[toprolecolor]]_#000000_{dsu_smallcaps_[[toprolealias]]}]]&8 » &7%name%%reply%:&f %message%
DSU 占位符来自本插件,代表 DiscordSRV Ultimate。
遗憾的是,该插件目前尚不支持在没有外部工具的情况下混合颜色本身。我计划在下个版本中实现这一功能。
? DiscordSRV Ultimate adds:
- Its own placeholders for making text bold, underline, italic or smallcaps
- Post-processed placeholders from both DiscordSRV and PlaceholderAPI
- An ability to make gradients in combination with other tools
Note: If you're using my mods, please do not buy Minecraft.
? Dependencies (must-install)
ℹ️ Information
- ⚠️ The plugin doesn't work on non-Paper Bukkit forks!
- A GitHub is not available, but the project is not obfuscated, you can decompile it freely.
- The plugin is licensed with CC-BY-NC 4.0, but you do NOT need to credit me.
? Usage
DiscordSRV Ultimate extends the possibilities of the DiscordToChatMessage format (DiscordToMinecraftChatMessageFormat and DiscordToMinecraftChatMessageFormatNoRole fields), by post-processing the output. For example, to make the role gradiented, you can use this:
[[gradient_message_$[[toprolecolor]]_#000000_[[toprolealias]]]]&8 » &7%name%%reply%:&f %message%
The example might look hard, but here's what it does:
- Get the top user role alias
- Make a gradient from the user role color (converted from
§x§r§r§g§g§b§b to #rrggbb) to #000000 with this text
To make it work, you must also have the Gradient PAPI Expansion installed:
/papi ecloud download Gradient
/papi reload
The plugin replaces both [[ and ]] with %, as if just % was used, it would be parsed during pre-processing. Why am I post-processing it? Because I have no idea how to make all this during pre-processing (DiscordSRV events are... weird).
As mentioned earlier, $§x§r§r§g§g§b§b converts to #rrggbb. This is for the gradients (and other color manipulation) to work.
? Merging
If you want to mix some of the things, e.g. smallcaps and gradient, you would have to use the Utils PAPI Expansion for that. The installation is also straightforward:
/papi ecloud download Utils
/papi reload
And the usage is... a bit complex:
[[utils_parse_gradient_message_$[[toprolecolor]]_#000000_{dsu_smallcaps_[[toprolealias]]}]]&8 » &7%name%%reply%:&f %message%
The DSU placeholders come from this plugin and stand for DiscordSRV Ultimate.
Sadly, the plugin doesn't yet support mixing the color itself without external tools. I am planning to implement that in the next release.
评论 0
登录后参与评分
还没有评论,来抢沙发吧