可在原版 Minecraft 对话框内实现可点击、像素级定位的 GUI —— 无需客户端模组。
Glyphwork 将完整的屏幕(面板、按钮、列表、网格、文本)渲染到自 1.21.6 以来 Minecraft 所具备的对话框屏幕上。玩家仅需一个资源包,而 Glyphwork 会自动生成并发送该资源包。所有元素在绘制位置均可精确点击。

适用对象
- 服务器管理员: 使用 YAML 文件描述菜单(执行命令的按钮、打开其他菜单或请求输入的按钮、滑块、复选框、选择项和表单、PlaceholderAPI、每个菜单一条命令、条件判断、模板、变量、选项卡、滚动窗格、折叠区域与手风琴控件、表格、步进器、柱状图、徽章、冷却时间、点击音效、根据数值改变颜色的进度条、在线玩家列表、世界列表、RSS 源或 JSON Web API、自动刷新的菜单)—— 无需编写代码。请参阅 菜单指南,或使用 菜单设计器 通过鼠标进行构建。
- 插件开发者: 使用 Java API 构建界面 —— 或在菜单设计中构建界面,然后将其复制为 Java 代码(即 Java 标签页)。
# plugins/Glyphwork/menus/warps.yml -> /warps
title: "<gold>传送点"
command: warps
elements:
- type: button
x: 8
y: 24
width: 72
height: 16
text: "出生点"
tint: "#50E050"
actions: ["player: spawn", "close"]
功能特性
- 场景 API 供插件开发者使用:支持任意瓦片形状的面板、标签、按钮、不可见碰撞盒、带自动分页的列表和网格、工具提示、颜色、按玩家区分的状态、导航(打开 / 返回 / 重新打开 / 关闭)、选项卡、滚动窗格、进度条、自定义图片、大型玩家头像、带粗体 / 斜体 / 下划线的文本、滑块、复选框和从皮肤绘制的选择按钮,以及通过小型原生对话框进行的文本输入或完整表单(文本、滑块、复选框、选择项)。多玩家共享屏幕(游戏、大厅、拍卖行):重绘其他玩家打开的屏幕、查询哪个场景处于打开状态、了解屏幕关闭的原因。自 1.0 版本起保持稳定:1.x 系列内无破坏性变更。
- 物品图标 涵盖 1595 种物品,用于网格、按钮、列表和菜单,直接从每位客户端已有的纹理中绘制。图标跟随服务器的资源包:被替换的纹理会被测量,且资源包自带的物品(如
myserver:ruby)可作为图标使用。玩家头像 作为小型 8 x 8 图标(head:Steve),例如用于在线玩家列表,或在按钮、列表和网格上以 16 至 32 像素从皮肤绘制。图标旁显示堆叠数量,如同物品栏一般。GUI 精灵 同样支持:心形、食物、护甲、每种状态效果、统计数据和小型图标(gui:hud/heart/full, gui:mob_effect/speed)。
- 自定义图片(PNG 格式,任意尺寸)可像其他元素一样放置,也可调整大小(
width、height、scale)。
- 自定义字体(自 1.4 版本起,实验性功能):将 TrueType/OpenType 字体(文件或 URL)放入
config.yml,并在菜单或任何文本元素中使用 font: 调用。Glyphwork 会将其渲染至资源包内部,因此换行、裁剪和对齐保持像素级精确;像素字体效果最佳。若字体缺少某些字母,则回退至 Minecraft 默认字体。
- 像素级精确点击,即使偏离 9 像素文本网格也能准确识别。
- 皮肤系统: 边框由微小图块自动拼接而成,因此任意形状均可无缝衔接。内置三种皮肤(原版、深色、羊皮纸);可使用基于浏览器的 皮肤编辑器 制作自定义皮肤。
- 浏览器端菜单设计器: 通过鼠标放置元素,编辑表单和变量,测试菜单并下载适用于服务器当前运行的 Glyphwork 版本的 YAML 文件。加载你自己的客户端 jar 后,它会显示真实的物品图标和字体(仅浏览器只读预览),并配合字体文件预览你自定义的字体。
- 示例插件 可供参考复制:一个基于 API 构建的小型商人,随每次发布附带提供。
- 资源包全自动处理: 启动时自动生成,哈希值稳定(无需重复下载),由内置 Web 服务器提供服务,写入磁盘以便你使用自己的 Web 服务器 / CDN,或与服务器或代理发送的资源包合并。反之亦然:服务器的资源包可嵌入 Glyphwork 资源包,使玩家只需获取单个资源包。
- 原生对话框后备方案: 拒绝资源包的玩家,以及通过 Geyser 连接的 Bedrock 玩家,将获得基于相同屏幕构建的原生对话框(或菜单的纯文本视图)。
- 每位玩家的显示模式(全屏 / 无图标 / 纯文本),适用于因自身资源包导致菜单错位的玩家:使用
/glyphwork display,或通过 API 由你的系统控制。
- 英文和德文 消息与命令,根据玩家的游戏语言自动选择;可在
plugins/Glyphwork/lang/ 中编辑文本或添加其他语言。
/glyphwork reload 应用配置和皮肤更改,并向所有在线玩家发送新资源包。
安装设置
- 将 jar 文件放入 Paper 26.1 至 26.3 服务器的
plugins/ 目录中(支持 26.1.2、26.2、26.3;需 Java 25)。对于 Paper 1.21.11,请使用 -mc1.21.11 版本(需 Java 21)。
- 在
plugins/Glyphwork/config.yml 中将 pack.url 设置为玩家可访问的地址(内置服务器:开放 pack-server.port;或使用 pack.hosting: external 搭配你自己的 Web 服务器)。
- 运行
/glyphwork reload,然后运行 /glyphwork test(演示)或 /glyphwork menu example(示例菜单;德语服务器上为 beispiel)。
开发者信息
Scene settings = Scene.builder("myplugin:settings", 176, 96)
.background()
.add(Label.of(8, 7, "设置"))
.add(Button.of(8, 24, 80, 16)
.text(v -> soundOn(v.player()) ? "音效:开启" : "音效:关闭")
.onClick(c -> { toggleSound(c.player()); c.reopen(); }))
.build();
Glyphwork.get().open(player, settings);
depend: [Glyphwork],编译时依赖来自 GitHub 发布页面 的 glyphwork-api。文档:API · 皮肤格式 · 工作原理。
限制
- Paper 26.1 至 26.3,客户端版本为 26.1 至 26.3(对于 Paper 1.21.11,请使用
-mc1.21.11 版本)。标记为实验性的部分(标签页、滚动窗格、1.6 新增的元素、Web 源、专属纯文本视图、Bedrock 行为)在小版本更新中仍可能发生变化。
- 对话框仅报告点击事件:无悬停、无右键点击、打开对话框期间按住按键无效。Glyphwork 的响应是一个模式按钮或作为预览的首次点击。
- 文字和图标始终绘制在框架之上;方块仅显示一个面(不支持 3D),由特殊渲染器绘制的物品(箱子、床、旗帜、盾牌)没有图标;小型玩家头像尺寸为 8x8,并置于 9px 的文字网格上(带有头像的小型元素最多可移动 4px,大型元素则保持原位);彩绘头像可以放置在任意位置。
该技术源自 PaperMC Discord 中一位开发者的公开说明;Glyphwork 是一项独立的、采用 MIT 许可证的实现。
Clickable, pixel-positioned GUIs inside vanilla Minecraft dialogs — no client mod.
Glyphwork renders whole screens (panels, buttons, lists, grids, text) into the dialog screen that Minecraft has had since 1.21.6. Players only need a resource pack, which Glyphwork generates and sends by itself. Everything is clickable exactly where it is drawn.

For whom
- Server admins: describe menus in YAML files (buttons that run commands, open other menus or ask for input, sliders, checkboxes, choices and forms, PlaceholderAPI, a command per menu, conditions, templates, variables, tabs, scroll panes, folding sections and accordions, tables, steppers, column charts, badges, cooldowns, click sounds, progress bars that change color by value, lists of online players, worlds, RSS feeds or JSON web APIs, menus that refresh themselves) - no coding. See the menu guide, or build them with the mouse in the menu designer.
- Plugin developers: build screens with the Java API - or design them in the menu designer and copy them as Java code (its Java tab).
# plugins/Glyphwork/menus/warps.yml -> /warps
title: "<gold>Warps"
command: warps
elements:
- type: button
x: 8
y: 24
width: 72
height: 16
text: "Spawn"
tint: "#50E050"
actions: ["player: spawn", "close"]
Features
- Scene API for plugin developers: panels of any tile shape, labels, buttons, invisible hitboxes, lists and grids with automatic paging, tooltips, colors, per-player state, navigation (open / back / reopen / close), tabs, scroll panes, progress bars, own pictures, big player heads, text with bold / italics / underline, sliders, checkboxes and choice buttons drawn from the skin, and text input or whole forms (text, slider, checkbox, choice) through small native dialogs. Screens shared by several players (games, lobbies, auctions): redraw another player's open screen, ask which scene is open, know why a screen closed. Stable from 1.0 on: no breaking changes within 1.x.
- Item icons for 1595 items in grids, buttons, lists and menus, drawn from the textures every client already has. Icons follow your server's resource pack: replaced textures are measured, and the pack's own items (
myserver:ruby) work as icons. Player heads as small 8 x 8 icons (head:Steve), e.g. in a list of online players, or painted from the skin at 16 to 32 px on buttons, lists and grids. Stack counts at the icon like in the inventory. GUI sprites too: hearts, food, armor, every status effect, statistics and small icons (gui:hud/heart/full, gui:mob_effect/speed).
- Own pictures (PNG, any size) placed like any element, also smaller or bigger (
width, height, scale).
- Own fonts (since 1.4, experimental): put a TrueType/OpenType font (a file or a URL) into
config.yml and use it with font: on the menu or any text element. Glyphwork draws it into the pack itself, so wrapping, cutting and centering stay pixel-exact; pixel fonts look best. Letters a font lacks come from the Minecraft font.
- Pixel-exact clicks, also off the 9 px text grid.
- Skins: frames are autotiled from tiny sheets, so any shape joins seamlessly. Three skins are built in (vanilla, dark, parchment); make your own with the browser-based skin editor.
- Menu designer in the browser: place elements with the mouse, edit forms and variables, try the menu out and download the YAML file, for the Glyphwork version your server runs. With your own client jar loaded it shows the real item icons and font (read only in your browser), and with the font files Glyphwork writes it previews your own fonts too.
- Example plugin to copy from: a small trader built against the API, attached to every release.
- Resource pack handled for you: generated on start, stable hash (no re-downloads), served by a built-in web server, written to disk for your own web server / CDN, or merged into the pack your server or proxy sends. Or the other way round: your server's pack goes into the Glyphwork pack, so players get a single pack.
- Plain dialog: players who decline the pack, and Bedrock players through Geyser, get a native dialog built from the same screen (or an own plain view of the menu).
- Display mode per player (full / without icons / plain) for players whose own resource pack tears the menus:
/glyphwork display, or controlled by your own system through the API.
- English and German messages and commands, picked per player from the game language; edit the texts or add languages in
plugins/Glyphwork/lang/.
/glyphwork reload applies config and skin changes and sends the new pack to everyone online.
Setup
- Put the jar into
plugins/ of a Paper 26.1 to 26.3 server (26.1.2, 26.2, 26.3; Java 25) and start it. For Paper 1.21.11 take the -mc1.21.11 version (Java 21).
- In
plugins/Glyphwork/config.yml set pack.url to an address your players can reach (built-in server: open pack-server.port; or pack.hosting: external with your own web server).
/glyphwork reload, then /glyphwork test (demo) or /glyphwork menu example (example menu; beispiel on German servers).
For developers
Scene settings = Scene.builder("myplugin:settings", 176, 96)
.background()
.add(Label.of(8, 7, "Settings"))
.add(Button.of(8, 24, 80, 16)
.text(v -> soundOn(v.player()) ? "Sound: ON" : "Sound: OFF")
.onClick(c -> { toggleSound(c.player()); c.reopen(); }))
.build();
Glyphwork.get().open(player, settings);
depend: [Glyphwork], compile against glyphwork-api from the GitHub release. Documentation: API · skin format · how it works.
Limits
- Paper 26.1 to 26.3, players with 26.1 to 26.3 clients (for Paper 1.21.11 take the
-mc1.21.11 versions). Parts marked experimental (tabs, scroll panes, the elements new in 1.6, web sources, the own plain view, Bedrock behaviour) may still change in a minor version.
- Dialogs report clicks only: no hover, no right click, no keys held while a dialog is open. Glyphwork's answer is a mode button or a first click as preview.
- Text and icons are always drawn on top of frames; blocks show one face (no 3D), items drawn by special renderers (chests, beds, banners, shields) have no icon; small player heads are 8 x 8 and sit on the 9 px text grid (small elements with a head move by up to 4 px, big ones keep their place); painted heads sit anywhere.
The technique goes back to a public description by a developer in the PaperMC Discord; Glyphwork is an independent, MIT-licensed implementation.
评论 0
登录后参与评分
还没有评论,来抢沙发吧