HexaForms
一个适用于 Minecraft 服务器的先进菜单系统,支持 PlaceholderAPI 集成、基岩版表单支持以及 DeluxeMenus 转换。
功能特性
- Java 版与基岩版支持:自动检测基岩版玩家并显示原生表单
- 下拉菜单:为基岩版玩家提供带有自定义选项的交互式下拉菜单
- 多步下拉表单:支持包含三个下拉步骤的高级表单,用于处理复杂的选择(如封禁命令等)
- DeluxeMenus 转换器:自动将 DeluxeMenus 配置转换为 HexaForms 格式
- PlaceholderAPI 集成:完全支持所有 PlaceholderAPI 占位符
- 灵活配置:基于 YAML 的简单菜单配置方式
- 条件检查:针对菜单项的高级条件判断功能
- 动作系统:内置 30 多种动作,包括执行命令、发送消息、播放音效、触发下拉操作等
- 附魔支持:支持附魔效果及发光特效
- 经济与权限管理:集成 Vault,用于经济系统与权限管理的动作支持
安装指南
-
确保已安装以下插件:
- PlaceholderAPI(必需)
- Floodgate(可选,用于基岩版支持)
- Geyser(可选,用于基岩版支持)
- Vault(可选,用于经济/权限相关动作)
-
将 HexaForms.jar 下载至你的 plugins 文件夹中
-
重启服务器
-
在 plugins/HexaForms/menus/ 文件夹中配置菜单
快速入门
转换 DeluxeMenus(新功能)
如果您正在从 DeluxeMenus 迁移:
- 将您的 DeluxeMenus
.yml 文件放入 plugins/HexaForms/dmconvert/
- 运行
/hexaconvert deluxemenus all(或 /hexaconvert deluxemenus <filename>)
- 转换后的菜单会出现在
plugins/HexaForms/menus/
详见 CONVERTER_README.md 获取详细的转换指南。
创建菜单
在 plugins/HexaForms/menus/ 中创建一个 YAML 文件:
title: "&6&lShop Menu"
size: 27
bedrock_form:
title: "&6&lShop Menu"
content: "&7Purchase items and equipment"
buttons:
- text: "&a&lWeapons"
actions:
- "[command] shop weapons"
- "[sound] ENTITY_PLAYER_LEVELUP 1 1.5"
items:
weapons_button:
slot: 10
material: DIAMOND_SWORD
display-name: "&a&lWeapons"
lore:
- "&7Click to browse weapons"
glowing: true
actions:
- "[command] shop weapons"
配置
主配置文件 (config.yml)
messages:
player-only: "&cThis command can only be used by players!"
menu-not-found: "&cMenu '%menu%' not found!"
no-permission: "&cYou don't have permission!"
condition-denied: "&cYou don't meet the requirements for this!"
reloaded: "&aPlugin reloaded successfully!"
default-menu: "main_menu"
auto-save: true
debug-mode: false
placeholders:
enabled: true
cache-time: 1000
bedrock:
enabled: true
fallback-to-java: true
image-cache: true
命令
/menu [menuName] - 打开菜单(默认:main_menu)
/menureload - 重新加载配置
/hexaconvert <deluxemenus> <all|file_name> - 将 DeluxeMenus 转换为 HexaForms(NEW!)
权限
hexaforms.menu.use - 允许访问菜单(默认:true)
hexaforms.reload - 允许重新加载插件配置(默认:op)
hexaforms.admin - 允许访问管理菜单(默认:op)
hexaforms.convert - 允许使用转换命令(默认:op)(NEW!)
动作
命令动作
[command] <command> - 以玩家身份执行命令
[console] <command> - 从控制台执行命令
[commandevent] <command> - 以玩家身份执行未注册的命令
消息动作
[message] <text> - 向玩家发送消息
[broadcast] <text> - 向所有在线玩家广播消息
[minimessage] <text> - 使用 MiniMessage 格式发送消息
[minibroadcast] <text> - 使用 MiniMessage 格式广播消息
[json] <JSON-text> - 向玩家发送 JSON 消息
[jsonbroadcast] <JSON-text> - 广播 JSON 消息
[chat] <message> - 以玩家身份在聊天中发送消息
菜单控制动作
[command] menu <menu-name> - 打开另一个菜单
[close] - 关闭当前打开的菜单
[refresh] - 刷新当前菜单视图中的物品
网络动作
[connect] <server-name> - 将玩家连接到 BungeeCord 上的服务器
声音动作
[sound] <sound> <volume> <pitch> - 为玩家播放声音
[broadcastsound] <sound> <volume> <pitch> - 向所有玩家广播声音
[broadcastsoundworld] <sound> <volume> <pitch> - 向世界中所有玩家广播声音
经济动作(需要 Vault)
[givemoney] <amount> - 给予玩家金钱
[takemoney] <amount> - 扣除玩家的金钱
经验值动作
[giveexp] <amount>L - 给予玩家经验等级(添加 L)或经验点
[takeexp] <amount>L - 扣除玩家的经验等级或经验点
权限动作(需要 Vault)
[givepermission] <perm.node> - 给予玩家权限
[takepermission] <perm.node> - 移除玩家的权限
元数据动作
[meta] <set/remove/add/subtract/switch> <key> <type> <value> - 修改玩家元数据
占位符动作
[placeholder] <papi-placeholders> - 解析玩家的占位符
下拉菜单动作(仅限基岩版)
玩家下拉菜单
[playerdropdown] <title>|<content>|<actions>
显示包含所有在线玩家的下拉列表。
占位符:
%selected_player% - 选中的玩家名称
%player_name% - 执行操作的玩家名称
示例:
- "[playerdropdown] &6Teleport|&7Select a player:|[console] tp %player_name% %selected_player%;[message] &aYou have been teleported!"
自定义下拉菜单
[dropdown] <title>|<content>|<options>|<actions>
显示包含自定义选项的下拉列表。
占位符:
%selected_option% - 被选中的选项文本
%selected_index% - 被选中选项的索引(从 0 开始)
示例:
- "[dropdown] &a游戏模式|&7选择:|生存,创造,冒险|[console] gamemode %selected_option% %player_name%"
多下拉菜单(NEW!)
[multidropdown] <标题>|<内容>|<标签1>|<标签2>|<标签3>|<选项1>||<选项2>||<选项3>||<操作>
在一个表单中显示三个下拉菜单。非常适合用于封禁指令!
占位符:
%selected_option_1%, %selected_option_2%, %selected_option_3% - 选中的选项
%selected_index_1%, %selected_index_2%, %selected_index_3% - 选中的索引
示例(封禁命令):
- "[multidropdown] &c&l封禁玩家|&7选择玩家、时长和原因|Player|Duration|Reason|Player1,Player2,Player3||1h,24h,7d,Permanent||Hacking,Spam,Beleidigung||[console] ban %selected_option_1% %selected_option_2% %selected_option_3%;[message] &a%selected_option_1% was banned!"
操作示例
actions:
# 命令
- "[command] warp spawn"
- "[console] give %player_name% diamond 1"
# 消息
- "[message] &a欢迎来到商店!"
- "[broadcast] &6%player_name% 进入了商店!"
- "[minimessage] <gradient:green:blue>欢迎!</gradient>"
# 音效
- "[sound] ENTITY_PLAYER_LEVELUP 1 1.5"
- "[broadcastsound] ENTITY_EXPERIENCE_ORB_PICKUP 1 1"
# 经济
- "[givemoney] 1000"
- "[takemoney] 500"
# 经验值
- "[giveexp] 10L"
- "[takeexp] 5"
# 权限
- "[givepermission] shop.vip"
- "[takepermission] shop.basic"
# 菜单控制
- "[command] menu vip_shop"
- "[close]"
- "[refresh]"
# 下拉菜单(仅限基岩版)
- "[playerdropdown] 选择玩家|请选择:|[console] tp %player_name% %selected_player%"
- "[dropdown] 选择|请选择:|Option1,Option2|[message] 你选择了 %selected_option%!"
- "[multidropdown] Ban|选择玩家、时间、原因|玩家|时间|原因|P1,P2||1h,24h||Hack,Spam||[console] ban %selected_option_1% %selected_option_2%"
## 条件
### 可用条件类型
- `permission:<权限>` - 检查权限
- `placeholder:<占位符> <运算符> <值>` - 检查占位符值
- `world:<世界名>` - 检查玩家所在的世界
- `gamemode:<游戏模式>` - 检查游戏模式
- `time:<范围>` - 检查游戏时间
### 示例
```yaml
conditions:
- "permission:shop.weapons"
- "placeholder:vault_eco_balance >= 1000"
- "world:world"
- "gamemode:survival"
- "time:0-12000"
PlaceholderAPI
该插件支持所有 PlaceholderAPI 占位符:
%player_name% - 玩家名称
%vault_eco_balance% - 账户余额(Vault)
%player_health% - 玩家生命值
%player_world% - 当前世界
- 以及更多……
Bedrock 支持
对于 Bedrock 版玩家,原生表单将自动显示:
- 自动检测 Bedrock 版玩家
- 支持下拉选项的原生表单 API
- 图片支持(URL 和路径)
- 用于选择玩家/选项的交互式下拉菜单
- 支持复杂选择的复选下拉表单
- 若出现问题,则回退至 Java 版菜单
示例菜单
该插件包含多个示例菜单:
- main_menu.yml - 主导航菜单
- teleport_menu.yml - 玩家传送带下拉菜单(基岩版)
- shop_menu.yml - 包含物品和分类的商店
- admin_menu.yml - 管理员工具与命令
故障排除
常见问题
- 菜单未显示:检查权限和配置
- 占位符无效:确保已安装 PlaceholderAPI
- 基岩版表单无法使用:检查 Floodgate/Geyser 的安装情况
- 下拉菜单不显示:仅适用于基岩版玩家——Java 版玩家看到的是箱子菜单
- 转换器无法使用:将 DeluxeMenus 文件放入
plugins/HexaForms/dmconvert/ 目录中
调试模式
在 config.yml 中启用调试模式:
debug-mode: true
版本历史
详细版本历史请参阅 CHANGELOG.md。
当前版本: 1.1.2
- 新增 DeluxeMenus 转换器
- 新增多级下拉操作
- 修复基岩版表单的颜色代码处理问题
- 增强占位符支持
技术支持
如有问题或疑问:
- 检查服务器日志
- 确保所有依赖项已安装
- 使用调试模式进行测试
- 查看 CHANGELOG.md 了解最近的更改
许可证
本插件采用 CC-BY-NC-4.0 许可协议。
HexaForms
An advanced menu system for Minecraft servers with PlaceholderAPI integration, Bedrock form support, and DeluxeMenus conversion.
Features
- Java & Bedrock Support: Automatic detection of Bedrock players and display of native forms
- Dropdown Menus: Interactive dropdown menus for Bedrock players with custom options
- Multi-Dropdown Forms: Advanced 3-dropdown forms for complex selections (ban commands, etc.)
- DeluxeMenus Converter: Convert DeluxeMenus configurations to HexaForms format automatically
- PlaceholderAPI Integration: Full support for all PlaceholderAPI placeholders
- Flexible Configuration: Simple YAML-based menu configuration
- Condition Checking: Advanced condition checking for menu items
- Action System: 30+ actions including commands, messages, sounds, dropdowns, and more
- Enchantment Support: Support for enchantments and glow effects
- Economy & Permissions: Vault integration for economy and permission management
Installation
-
Make sure you have the following plugins installed:
- PlaceholderAPI (required)
- Floodgate (optional, for Bedrock support)
- Geyser (optional, for Bedrock support)
- Vault (optional, for economy/permission actions)
-
Download the HexaForms.jar to your plugins folder
-
Restart the server
-
Configure the menus in the plugins/HexaForms/menus/ folder
Quick Start
Convert DeluxeMenus (New!)
If you're migrating from DeluxeMenus:
- Place your DeluxeMenus
.yml files in plugins/HexaForms/dmconvert/
- Run
/hexaconvert deluxemenus all (or /hexaconvert deluxemenus <filename>)
- Converted menus appear in
plugins/HexaForms/menus/
See CONVERTER_README.md for detailed conversion guide.
Create a Menu
Create a YAML file in plugins/HexaForms/menus/:
title: "&6&lShop Menu"
size: 27
bedrock_form:
title: "&6&lShop Menu"
content: "&7Purchase items and equipment"
buttons:
- text: "&a&lWeapons"
actions:
- "[command] shop weapons"
- "[sound] ENTITY_PLAYER_LEVELUP 1 1.5"
items:
weapons_button:
slot: 10
material: DIAMOND_SWORD
display-name: "&a&lWeapons"
lore:
- "&7Click to browse weapons"
glowing: true
actions:
- "[command] shop weapons"
Configuration
Main Configuration (config.yml)
messages:
player-only: "&cThis command can only be used by players!"
menu-not-found: "&cMenu '%menu%' not found!"
no-permission: "&cYou don't have permission!"
condition-denied: "&cYou don't meet the requirements for this!"
reloaded: "&aPlugin reloaded successfully!"
default-menu: "main_menu"
auto-save: true
debug-mode: false
placeholders:
enabled: true
cache-time: 1000
bedrock:
enabled: true
fallback-to-java: true
image-cache: true
Commands
/menu [menuName] - Opens a menu (default: main_menu)
/menureload - Reloads the configuration
/hexaconvert <deluxemenus> <all|file_name> - Converts DeluxeMenus to HexaForms (NEW!)
Permissions
hexaforms.menu.use - Allows access to menus (default: true)
hexaforms.reload - Allows reloading the plugin configuration (default: op)
hexaforms.admin - Allows access to admin menus (default: op)
hexaforms.convert - Allows using the converter command (default: op) (NEW!)
Actions
Command Actions
[command] <command> - Executes a command as the player
[console] <command> - Executes a command from the console
[commandevent] <command> - Executes an unregistered command as the player
Message Actions
[message] <text> - Sends a message to the player
[broadcast] <text> - Sends a message to everyone online
[minimessage] <text> - Sends a message using MiniMessage format
[minibroadcast] <text> - Broadcasts using MiniMessage format
[json] <JSON-text> - Sends a JSON message to the player
[jsonbroadcast] <JSON-text> - Broadcasts a JSON message
[chat] <message> - Sends a message in chat as the player
Menu Control Actions
[command] menu <menu-name> - Opens another menu
[close] - Closes the currently opened menu
[refresh] - Refreshes items in the current menu view
Network Actions
[connect] <server-name> - Connects the player to a server on BungeeCord
Sound Actions
[sound] <sound> <volume> <pitch> - Plays a sound for the player
[broadcastsound] <sound> <volume> <pitch> - Broadcasts a sound to all players
[broadcastsoundworld] <sound> <volume> <pitch> - Broadcasts a sound to all players in the world
Economy Actions (Vault required)
[givemoney] <amount> - Gives money to the player
[takemoney] <amount> - Takes money from the player
Experience Actions
[giveexp] <amount>L - Gives exp levels (add L) or points to a player
[takeexp] <amount>L - Takes exp levels or points from a player
Permission Actions (Vault required)
[givepermission] <perm.node> - Gives a permission to a player
[takepermission] <perm.node> - Takes a permission from a player
Meta Data Actions
[meta] <set/remove/add/subtract/switch> <key> <type> <value> - Modifies player meta data
Placeholder Actions
[placeholder] <papi-placeholders> - Parses placeholders for a player
Dropdown Menu Actions (Bedrock Only)
Player Dropdown
[playerdropdown] <title>|<content>|<actions>
Shows a dropdown with all online players.
Placeholders:
%selected_player% - The selected player name
%player_name% - The executing player's name
Example:
- "[playerdropdown] &6Teleport|&7Select a player:|[console] tp %player_name% %selected_player%;[message] &aYou have been teleported!"
Custom Dropdown
[dropdown] <title>|<content>|<options>|<actions>
Shows a dropdown with custom options.
Placeholders:
%selected_option% - The selected option text
%selected_index% - The index of the selected option (0-based)
Example:
- "[dropdown] &aGamemode|&7Choose:|Survival,Creative,Adventure|[console] gamemode %selected_option% %player_name%"
Multi-Dropdown (NEW!)
[multidropdown] <title>|<content>|<label1>|<label2>|<label3>|<options1>||<options2>||<options3>||<actions>
Shows 3 dropdowns in one form. Perfect for ban commands!
Placeholders:
%selected_option_1%, %selected_option_2%, %selected_option_3% - Selected options
%selected_index_1%, %selected_index_2%, %selected_index_3% - Selected indices
Example (Ban Command):
- "[multidropdown] &c&lBan Player|&7Select player, duration, and reason|Player|Duration|Reason|Player1,Player2,Player3||1h,24h,7d,Permanent||Hacking,Spam,Beleidigung||[console] ban %selected_option_1% %selected_option_2% %selected_option_3%;[message] &a%selected_option_1% was banned!"
Action Examples
actions:
# Commands
- "[command] warp spawn"
- "[console] give %player_name% diamond 1"
# Messages
- "[message] &aWelcome to the shop!"
- "[broadcast] &6%player_name% entered the shop!"
- "[minimessage] <gradient:green:blue>Welcome!</gradient>"
# Sounds
- "[sound] ENTITY_PLAYER_LEVELUP 1 1.5"
- "[broadcastsound] ENTITY_EXPERIENCE_ORB_PICKUP 1 1"
# Economy
- "[givemoney] 1000"
- "[takemoney] 500"
# Experience
- "[giveexp] 10L"
- "[takeexp] 5"
# Permissions
- "[givepermission] shop.vip"
- "[takepermission] shop.basic"
# Menu Control
- "[command] menu vip_shop"
- "[close]"
- "[refresh]"
# Dropdowns (Bedrock Only)
- "[playerdropdown] Select Player|Choose:|[console] tp %player_name% %selected_player%"
- "[dropdown] Choose|Select:|Option1,Option2|[message] You selected %selected_option%!"
- "[multidropdown] Ban|Select player, time, reason|Player|Time|Reason|P1,P2||1h,24h||Hack,Spam||[console] ban %selected_option_1% %selected_option_2%"
Conditions
Available Condition Types
permission:<permission> - Checks permissions
placeholder:<placeholder> <operator> <value> - Checks placeholder values
world:<worldname> - Checks the player's world
gamemode:<gamemode> - Checks the game mode
time:<range> - Checks the game time
Examples
conditions:
- "permission:shop.weapons"
- "placeholder:vault_eco_balance >= 1000"
- "world:world"
- "gamemode:survival"
- "time:0-12000"
PlaceholderAPI
The plugin supports all PlaceholderAPI placeholders:
%player_name% - Player name
%vault_eco_balance% - Account balance (Vault)
%player_health% - Player health
%player_world% - Current world
- And many more...
Bedrock Support
For Bedrock players, native forms are automatically displayed:
- Automatic detection of Bedrock players
- Native form API with dropdown support
- Image support (URL and path)
- Interactive dropdown menus for player/option selection
- Multi-dropdown forms for complex selections
- Fallback to Java menus if problems occur
Example Menus
The plugin includes several example menus:
- main_menu.yml - Main navigation menu
- teleport_menu.yml - Player teleport with dropdown (Bedrock)
- shop_menu.yml - Shop with items and categories
- admin_menu.yml - Admin tools and commands
Troubleshooting
Common Issues
- Menu not displaying: Check permissions and configuration
- Placeholders not working: Make sure PlaceholderAPI is installed
- Bedrock forms not working: Check Floodgate/Geyser installation
- Dropdown not showing: Only works for Bedrock players - Java players see chest menus
- Converter not working: Place DeluxeMenus files in
plugins/HexaForms/dmconvert/
Debug Mode
Enable debug mode in config.yml:
debug-mode: true
Version History
See CHANGELOG.md for detailed version history.
Current Version: 1.1.2
- Added DeluxeMenus Converter
- Added Multi-Dropdown Action
- Fixed color code handling for Bedrock forms
- Enhanced placeholder support
Support
For problems or questions:
- Check the server logs
- Make sure all dependencies are installed
- Test with debug mode
- Check CHANGELOG.md for recent changes
License
This plugin is licensed under CC-BY-NC-4.0.
评论 0
登录后参与评分
还没有评论,来抢沙发吧