GFMenu
GFMenu 是一款适用于 Bukkit、Spigot 和 Paper 1.21+ 服务器的 GUI 菜单插件。它支持读取 TrMenu 风格和 DeluxeMenus 风格的 YAML 配置,提供带书写书输入功能的游戏中菜单编辑器,并包含实用的管理命令。
功能
- 加载静态的 TrMenu 风格和 DeluxeMenus 风格菜单。
- 在游戏中编辑菜单标题、物品、描述(lore)、权限和点击动作。
- 使用书写书编辑文本和动作,而非手动输入材质 ID 或 YAML。
- 备份菜单 YAML 文件,并通过管理员命令验证菜单配置。
- 在简体中文和英文之间切换面向玩家的提示信息。
- 领取每日签到奖励并查看签到状态。
兼容性
GFMenu 支持静态的 TrMenu 布局和图标、重复布局符号、Icons.<key>.slots 的值和范围、通用点击组以及标准动作前缀。也支持 DeluxeMenus 风格的菜单标题、大小、物品和槽位。
GFMenu 不处理 Kether 脚本、JavaScript 驱动的动态槽位以及条件性图标切换。这些高级功能仍需依赖 TrMenu。
安装
- 使用 Java 21 以及 Bukkit、Spigot 或 Paper 1.21+ 服务器。
- 将
GFMenu.jar 放入服务器的 plugins 目录中。
- 启动或重启服务器。菜单文件将从
plugins/GFMenu/menus/ 加载。
- 授予管理员
gfmenu.admin 权限(默认:OP)。
命令
| 命令 |
描述 |
/gfmenu help |
显示可用命令。 |
/gfmenu list |
列出已加载的菜单。 |
/gfmenu info <menu> |
显示菜单格式、大小、物品数量和权限。 |
/gfmenu open <menu> <player> |
为在线玩家打开一个菜单。 |
/gfmenu close |
关闭你当前的菜单。 |
/gfmenu lang [zh_CN/en_US] |
查看或更改全服消息语言。 |
/gfmenu checkin [status] |
领取今日奖励或查看签到状态。 |
/gfmenu update |
检查主 GitHub 仓库是否有新版本发布。 |
/gfmenu backup |
创建带有时间戳的菜单 YAML 文件 ZIP 备份。 |
/gfmenu validate [menu] |
检查菜单是否存在常见的配置问题。 |
/gfmenu reload |
重新加载菜单和插件配置。 |
/gfmenu edit <menu> |
打开游戏中的菜单编辑器。 |
除非你的服务器以其他方式授予访问权限,否则菜单编辑、重载、备份、验证和更新命令需要 gfmenu.admin 权限。/gfmenu info 使用 gfmenu.info 权限(默认:OP)。签到功能使用 gfmenu.checkin 权限(默认:所有人可用)。
/gfmenu backup 将归档文件保存在 plugins/GFMenu/backups/ 下。/gfmenu validate [menu] 会报告缺失的 TrMenu 布局图标、无效的 DeluxeMenus 槽位以及未知的材质。
语言与配置
默认消息语言为 zh_CN。运行 /gfmenu lang en_US 或 /gfmenu lang zh_CN 进行更改;选择将应用于全服并保存至 config.yml。也接受简写形式如 en 和 zh。
更新检查针对 levindurant303/GFMenu 仓库中的发布版本异步运行。在 config.yml 中设置 update-check: false 可禁用自动启动检查;管理员仍可通过 /gfmenu update 手动检查。
每日和连续签到奖励在 plugins/GFMenu/checkin.yml 中配置。语言资源位于 plugins/GFMenu/languages/,可用于覆盖内置消息。
在游戏中编辑菜单
运行 /gfmenu edit <menu> 并点击现有物品,或将背包中的物品放入空的菜单槽位。物品编辑器提供用于名称、描述和点击动作的书籍。在书中写入普通文本后点击 Done 即可应用。使用 Save and return 保存物品并返回菜单编辑器。
编辑器支持左键、右键、任意键点击、Shift+左键、Shift+右键、中键和丢弃动作。你也可以通过命令行编辑字段:
/gfmenu edit <menu> title <text>
/gfmenu edit <menu> permission <node|none>
/gfmenu edit <menu> size <9-54>
/gfmenu edit <menu> item <slot> <material> [amount] [name]
/gfmenu edit <menu> remove <slot>
/gfmenu edit <menu> lore <slot> <set|add|remove|clear> [text|index]
/gfmenu edit <menu> action <slot> <click-type> <set|add|remove|clear> [action|index]
click-type 接受 left、right、all、shift_left、shift_right、middle、drop 以及其他小写的 Bukkit 点击名称。size 命令适用于 DeluxeMenus 风格菜单;TrMenu 的库存大小遵循其布局行数和最高配置的静态槽位。
菜单与动作示例
TrMenu 风格图标示例:
layout:
- " A "
Icons:
A:
display:
material: DIAMOND
name: "&bRewards"
actions:
left:
- "command: warp rewards"
right:
- "console: give %player% diamond 1"
- "sound: ENTITY_PLAYER_LEVELUP-1-1"
支持的动作前缀包括 command:、console:、tell:、message:、chat:、menu:、sound:、close、catcher: 和 book:。也识别 TrMenu 风格的 [player]、[console]、[message]、[open] 和 [close] 前缀。op: 被视为 console:;GFMenu 不会为玩家授予临时 OP 状态。
动作可使用 %player%、%uuid%、%player_uuid%、%world%、%server% 和 %online%。声音名称可以包含命名空间以及音量/音调,例如 minecraft:entity_player_levelup-1-1。
书籍输入动作
使用 book: 让玩家在书写书中提交文本。确认后,所有页面内容均可作为 %book_input% 使用,并执行配置的 end= 动作。
actions:
left:
- "book:feedback|prompt=&e在书中写下你的反馈。|end=console: feedback save %player% %book_input%|cancel=tell: &c反馈已取消。"
仅将 %book_input% 放置在由受信任插件处理的参数中。不要将其用作完整的控制台命令(例如 console: %book_input%),因为这会让玩家选择服务器执行的命令。
GFMenu
GFMenu is a GUI menu plugin for Bukkit, Spigot, and Paper 1.21+ servers. It reads TrMenu-style and DeluxeMenus-style YAML, provides an in-game menu editor with writable-book input, and includes practical administration commands.
Features
- Load static TrMenu-style and DeluxeMenus-style menus.
- Edit menu titles, items, lore, permissions, and click actions in game.
- Edit text and actions in writable books instead of typing material IDs or YAML by hand.
- Back up menu YAML files and validate menu configuration with administrator commands.
- Switch player-facing messages between Simplified Chinese and English.
- Claim daily check-in rewards and inspect check-in status.
Compatibility
GFMenu supports static TrMenu layouts and icons, repeated layout symbols, Icons.<key>.slots values and ranges, common click groups, and standard action prefixes. DeluxeMenus-style menu titles, sizes, items, and slots are also supported.
Kether scripts, JavaScript-driven or otherwise dynamic slots, and conditional icon switching are not evaluated by GFMenu. These advanced features still require TrMenu.
Installation
- Use Java 21 and a Bukkit, Spigot, or Paper 1.21+ server.
- Place
GFMenu.jar in the server's plugins directory.
- Start or restart the server. Menu files are loaded from
plugins/GFMenu/menus/.
- Grant administrators the
gfmenu.admin permission (default: operators).
Commands
| Command |
Description |
/gfmenu help |
Show available commands. |
/gfmenu list |
List loaded menus. |
/gfmenu info <menu> |
Show menu format, size, item count, and permission. |
/gfmenu open <menu> <player> |
Open a menu for an online player. |
/gfmenu close |
Close your current menu. |
/gfmenu lang [zh_CN/en_US] |
View or change the server-wide message language. |
/gfmenu checkin [status] |
Claim today's reward or view check-in status. |
/gfmenu update |
Check for a release from the main GitHub repository. |
/gfmenu backup |
Create a timestamped ZIP backup of menu YAML files. |
/gfmenu validate [menu] |
Check menus for common configuration issues. |
/gfmenu reload |
Reload menu and plugin configuration. |
/gfmenu edit <menu> |
Open the in-game menu editor. |
Menu editing, reload, backup, validation, and update commands require gfmenu.admin unless your server grants access another way. /gfmenu info uses gfmenu.info (default: operators). Check-in uses gfmenu.checkin (default: enabled for everyone).
/gfmenu backup saves archives under plugins/GFMenu/backups/. /gfmenu validate [menu] reports missing TrMenu layout icons, invalid DeluxeMenus slots, and unknown materials.
Language and configuration
The default message language is zh_CN. Run /gfmenu lang en_US or /gfmenu lang zh_CN to change it; the selection applies server-wide and is saved in config.yml. Short forms such as en and zh are also accepted.
Update checks run asynchronously against releases in levindurant303/GFMenu. Set update-check: false in config.yml to disable automatic startup checks; administrators can still run /gfmenu update manually.
Daily and streak rewards are configured in plugins/GFMenu/checkin.yml. Language resources are available in plugins/GFMenu/languages/ and can override bundled messages.
Editing menus in game
Run /gfmenu edit <menu> and click an existing item, or place an item from your inventory into an empty menu slot. The item editor provides books for the name, lore, and click actions. Write normal text in a book and click Done to apply it. Use Save and return to save the item and go back to the menu editor.
The editor supports left, right, any-click, shift-left, shift-right, middle, and drop actions. You can also edit fields from the command line:
/gfmenu edit <menu> title <text>
/gfmenu edit <menu> permission <node|none>
/gfmenu edit <menu> size <9-54>
/gfmenu edit <menu> item <slot> <material> [amount] [name]
/gfmenu edit <menu> remove <slot>
/gfmenu edit <menu> lore <slot> <set|add|remove|clear> [text|index]
/gfmenu edit <menu> action <slot> <click-type> <set|add|remove|clear> [action|index]
click-type accepts left, right, all, shift_left, shift_right, middle, drop, and other lowercase Bukkit click names. The size command applies to DeluxeMenus-style menus; TrMenu inventory size follows its layout rows and highest configured static slot.
Menu and action examples
Example TrMenu-style icon:
layout:
- " A "
Icons:
A:
display:
material: DIAMOND
name: "&bRewards"
actions:
left:
- "command: warp rewards"
right:
- "console: give %player% diamond 1"
- "sound: ENTITY_PLAYER_LEVELUP-1-1"
Supported action prefixes include command:, console:, tell:, message:, chat:, menu:, sound:, close, catcher:, and book:. TrMenu-style [player], [console], [message], [open], and [close] prefixes are also recognized. op: is treated as console:; GFMenu does not grant temporary operator status to players.
Actions can use %player%, %uuid%, %player_uuid%, %world%, %server%, and %online%. Sound names may include a namespace and volume/pitch, for example minecraft:entity_player_levelup-1-1.
Book input action
Use book: to let a player submit text in a writable book. After confirmation, all pages are available as %book_input%, and the configured end= actions run.
actions:
left:
- "book:feedback|prompt=&eWrite your feedback in the book.|end=console: feedback save %player% %book_input%|cancel=tell: &cFeedback cancelled."
Only place %book_input% in an argument handled by a trusted plugin. Do not use it as a complete console command, such as console: %book_input%, because that would let a player choose the command executed by the server.
评论 0
登录后参与评分
还没有评论,来抢沙发吧