InteractiveImage
一个 Paper 插件,将 ImageFrame 地图转换为交互式 UI 面板 —— 支持悬停检测、视觉效果和点击操作,所有配置均可在游戏中完成。
依赖要求
| 依赖项 |
版本 |
| Paper (或其分支) |
1.21+ |
| ImageFrame by LOOHP |
最新版 |
| Java |
21+ |
安装
- 将
InteractiveImage.jar 放入服务器的 plugins/ 文件夹中。
- 确保已安装 ImageFrame。
- 重启服务器。
不会生成 config.yml 文件。所有设置均针对每个框架(frame),并存储在 plugins/InteractiveImage/iiamge.json 中。
命令
| 命令 |
描述 |
/ii |
切换编辑器模式开启/关闭 |
/ii on / /ii off |
显式设置编辑器模式 |
/ii reload |
重新加载数据并重启扫描器 |
别名: iimage, iiimage, interactiveimage
权限: interactiveimage.admin(默认:op)
游戏内编辑器
- 运行
/ii 进入编辑器模式。
- 注视一个 ImageFrame 物品展示框,并右键点击它以打开 GUI。
- 配置该框架的效果、激活距离、可见性和点击操作。
- 再次运行
/ii 退出编辑器模式。
效果
当玩家注视某个框架时,可为其应用以下效果的任意组合:
- 发光(Glow) — 使用可配置的颜色和模式(
FRAME 或 BLOCK)高亮显示框架
- 闪烁(Glint) — 类似附魔物品的闪光效果
- 隐藏框架方块高亮 — 揭示隐藏在物品展示框后面的方块
- 状态栏消息(ActionBar) — 在状态栏显示一条消息,支持可配置的格式和刷新率
- 标题(Title) — 发送带有可配置淡入、停留和淡出时间的标题/副标题
- BossBar — 显示 Boss 条,支持可配置的文字、颜色、样式和进度
所有效果均支持基于服务器全局默认值的逐框架覆盖。
点击操作
当玩家左键或右键点击已配置的框架时触发操作。每个操作均为以下格式之一的字符串:
| 格式 |
行为 |
console:<command> |
以控制台身份运行命令 |
player:<command> |
以点击玩家的身份运行命令 |
<command> |
等同于 player: |
操作支持占位符,这些占位符将在运行时被替换(例如玩家名称、地图名称)。
示例操作:
console:say %player% clicked the map
player:warp spawn
逐框架配置
每个框架规则支持以下配置项:
title — 显示名称
cooldownTicks — 触发操作之间的冷却时间(以刻为单位)
cancelInteract — 是否取消交互事件
onRightClick / onLeftClick — 操作列表
activation — 覆盖悬停距离、点击距离以及“悬停后是否需点击”的设置
effects — 覆盖发光颜色/模式、框架可见性、ActionBar、Title 和 BossBar 设置
构建
./gradlew build
输出的 jar 文件将位于 build/libs/ 中。
InteractiveImage
A Paper plugin that turns ImageFrame maps into interactive UI panels — hover detection, visual effects, and click actions, all configured in-game.
Requirements
| Dependency |
Version |
| Paper (or fork) |
1.21+ |
| ImageFrame by LOOHP |
latest |
| Java |
21+ |
Installation
- Drop
InteractiveImage.jar into your server's plugins/ folder.
- Make sure ImageFrame is installed.
- Restart the server.
No config.yml is generated. All settings are per-frame and stored in plugins/InteractiveImage/iiamge.json.
Commands
| Command |
Description |
/ii |
Toggle editor mode on/off |
/ii on / /ii off |
Explicitly set editor mode |
/ii reload |
Reload data and restart scanners |
Aliases: iimage, iiimage, interactiveimage
Permission: interactiveimage.admin (default: op)
In-Game Editor
- Run
/ii to enter editor mode.
- Look at an ImageFrame item frame and right-click it to open the GUI.
- Configure the frame's effects, activation distances, visibility, and click actions.
- Run
/ii again to exit editor mode.
Effects
Each frame can have any combination of these effects applied when a player looks at it:
- Glow — highlights the frame with a configurable color and mode (
FRAME or BLOCK)
- Glint — item-enchantment-style shimmer on the frame
- Hidden frame block highlight — reveals the block behind a hidden item frame
- ActionBar — displays a message in the action bar with a configurable format and refresh rate
- Title — sends a title/subtitle with configurable fade-in, stay, and fade-out durations
- BossBar — shows a boss bar with configurable text, color, style, and progress
All effects support per-frame overrides on top of server-wide defaults.
Click Actions
Actions fire when a player left-clicks or right-clicks a configured frame. Each action is a string in one of these formats:
| Format |
Behavior |
console:<command> |
Runs the command as the console |
player:<command> |
Runs the command as the clicking player |
<command> |
Same as player: |
Actions support placeholders that are replaced at runtime (e.g. player name, map name).
Example actions:
console:say %player% clicked the map
player:warp spawn
Per-Frame Configuration
Each frame rule supports:
title — display name
cooldownTicks — cooldown between action triggers
cancelInteract — whether to cancel the interact event
onRightClick / onLeftClick — action lists
activation — override hover distance, click distance, and hover-required-for-click
effects — override glow color/mode, frame visibility, ActionBar, Title, and BossBar settings
Building
./gradlew build
Output jar will be in build/libs/.
评论 0
登录后参与评分
还没有评论,来抢沙发吧