Glyphs,
一款轻量级 Spigot 插件,通过资源包使用字形(Glyphs)——由 Misieur 开发
如何创建新的字形
要创建新字形,首先需要在插件文件夹中找到 glyphs.yml 文件并打开它。
你可以通过添加新条目并填入所需字段来创建新字形。
以下是一个字形配置的示例:
example_glyph:
image_path: "font/example_image" # 不需要 .png 后缀
height: 8
ascent: 7
然后,你可以将图片放入 textures 文件夹中,路径需与 image_path 字段中指定的路径一致。
现在你可以使用 /glyphs reload 命令来重建资源包。
在游戏中使用字形
首先,你需要确保玩家已在客户端安装了该资源包。
完成此步骤后,在你的服务器上有多种方式可以使用字形。
本插件的工作原理是:不使用静态 Unicode 字符,而是使用翻译键,这使得客户端能够识别哪个字形对应哪个字符,而不是在服务器端进行映射。
使用 Minecraft 命令
你可以使用 /tellraw 命令向玩家发送字形。
以下是使用 tellraw 命令发送字形的示例:
/tellraw @p {"translate":"glyph.example_glyph"}
使用 MiniMessage 格式
对于支持 MiniMessage 格式的插件,你可以使用以下语法来显示字形:
(无回退文本)
<tr:glyph.example_glyph>
(带回退文本)
<tr_or:glyph.example_glyph:'Emoji Not Found'>
支持
附加信息
权限组(Ranks)
若要在使用 TAB 插件时显示字形权限组,你需要创建一个 LuckPerms 组,并编辑 plugins/TAB/groups.yml 文件以添加以下配置:
group_name:
tabprefix: "<tr:glyph.glyph_name>"
偏移量(Offsets)
若要使用文本偏移量,你可以使用 offsets.number,其中 number 为 config.yml 文件中定义的 from 到 to 之间的任意数值(默认为 -1023 到 1024)。
示例:
/tellraw @p {"translate":"offsets.51"}
<tr:offsets.-40>
Glyphs,
A Lightweight Spigot plugin to create glyphs using a resource pack by Misieur
How to create new glyphs
To create new glyphs, you first want to find the glyphs.yml file in the plugin folder and open it.
You can create new glyphs by adding a new entry and adding the required fields.
Here is an example of a glyph configuration:
example_glyph:
image_path: "font/example_image" # the .png is not required
height: 8
ascent: 7
Then you can put your image in the textures folder with the same path as specified in the image_path field.
You can now use the /glyphs reload command to rebuild the resource pack.
How to use glyphs in-game
You first need to make sure your players have the resource pack installed on their clients.
Once this is done, there are multiple ways to use glyphs in your server.
The way this plugin works is that instead of using static Unicode characters, it uses translations, this makes, so the client knows which glyph is which character instead of mapping them server side.
Using minecraft commands
You can use the /tellraw command to send glyphs to players.
Here is an example of how to send a glyph using the tellraw command:
/tellraw @p {"translate":"glyph.example_glyph"}
Using the minimessage format
For plugins that support the minimessage format, you can use the following syntax to display glyphs:
(no fallback)
<tr:glyph.example_glyph>
(with fallback)
<tr_or:glyph.example_glyph:'Emoji Not Found'>
Support
Additional information
Ranks
To display glyph ranks using the TAB plugin, you have to create a luckperms group and edit the plugins/TAB/groups.yml file to add the following configuration:
group_name:
tabprefix: "<tr:glyph.glyph_name>"
Offsets
To use text offsets, you can use offsets.number with any number between from and to from the config.yml file (-1023 to 1024 by default).
Examples:
/tellraw @p {"translate":"offsets.51"}
<tr:offsets.-40>
评论 0
登录后参与评分
还没有评论,来抢沙发吧