MapBrowser
一款强大的 Spigot/Paper 插件,利用地图和 Java Chromium 嵌入式框架 (JCEF) 将现代网络浏览器带入 Minecraft。你可以与任何网站互动、观看视频,甚至直接在 Minecraft 中玩 Minecraft!
✨ 功能
- 动态浏览器创建:在世界中的任何位置、以任何尺寸创建交互式浏览器屏幕。
- 实时网页渲染:由 Chromium 引擎驱动,支持完整的 CSS 和 JavaScript,可渲染现代网站。
- 完全交互性:点击、输入文字并发送按键(如 Enter、Shift),像使用真实浏览器一样与网页进行交互。
- 游戏内开发者工具:实时切换 Chromium DevTools,以便即时调试网页布局和性能。
- 高度可配置:通过
config.yml 启用远程调试、设置自定义用户代理、更改用户数据路径以及添加自定义 CEF 参数。
❗ 依赖项
本插件需要 MapEngine API 才能正常运行。请在安装 MapBrowser 之前将其安装到你的服务器上。
⚙️ 安装
- 在你的服务器上下载并安装 MapEngine。
- 从 Releases Page 或“Versions”标签页下载最新的
MapBrowser-*-all.jar。
- 将下载的
.jar 文件放入服务器的 plugins 目录中。
- 重启你的服务器。
⚠️ 首次设置重要提示:
在首次启动时,MapBrowser 会自动下载必要的 Chromium 嵌入式框架 (JCEF) 二进制文件。此过程可能需要几分钟,且需要稳定的网络连接。请监控控制台以查看进度。
? 命令与权限
| 命令 |
描述 |
用法 |
权限 |
/mb create |
在指定位置创建一个新的浏览器屏幕。 |
/mb create <x> <y> <z> <url> [width] [height] |
mapbrowser.command.create |
/mb list |
列出当前所有活动的浏览器屏幕。 |
/mb list |
mapbrowser.command.list |
/mb remove |
移除指定的浏览器屏幕。 |
/mb remove <id> |
mapbrowser.command.remove |
/mb modify |
修改现有屏幕的属性。 |
/mb modify <id> <prop> [values...] |
mapbrowser.command.modify |
├ url |
更改屏幕加载的 URL。 |
/mb modify <id> url <new_url> |
|
├ devtools |
开启或关闭开发者工具。 |
/mb modify <id> devtools <on|off> |
|
├ pos |
移动浏览器屏幕。 |
/mb modify <id> pos <x> <y> <z> |
|
├ size |
更改浏览器屏幕的大小。 |
/mb modify <id> size <width> <height> |
|
└ refresh |
刷新浏览器页面。 |
/mb modify <id> refresh |
|
└ scale |
设置浏览器页面的缩放比例。 |
/mb modify <id> scale <newScale> |
|
/mb input |
向指定的屏幕发送文本输入。 |
/mb input <id> <text...> |
mapbrowser.command.input |
/mb keys |
向指定的屏幕发送按键事件。 |
/mb keys <id> <key> <action> |
mapbrowser.command.keys |
/mb executeJs |
在指定的浏览器屏幕中执行自定义 JS 代码或 JS 片段。 |
/mb executeJs <id> <jsCode|snippet.js> |
mapbrowser.command.executejs |
/mb near |
列出最近的浏览器屏幕的 ID。 |
/mb near |
mapbrowser.command.near |
? 配置文件 (config.yml)
配置文件会在首次运行时生成于 plugins/MapBrowser/config.yml。
# --------------------------------------------------- #
# MapBrowser Configuration #
# --------------------------------------------------- #
jcef:
# 你的自定义 JCEF 二进制文件路径(留空以禁用)
# 默认值: (plugins)/MapBrowser/jcef-bundle
custom-install-path: ""
# 自定义 jcef-maven 下载镜像(用于自定义构建)
mirror: "https://github.com/Steve3184/mb_jcefbuild/releases/download/v1/"
# JCEF 是否在启动时检查 JCEF 二进制文件?
skip-download: false
browser:
# 是否启用音效(默认为 false)
enable-sound: false
# CEF 的用户数据目录
# 默认值:(plugins)/MapBrowser/userdata
user-data-dir: "userdata"
# CEF 的远程调试功能
remote-debugging:
enabled: false
# 是否启用?(默认为 false)
port: 9222
# 远程调试端口(默认为 9222)
# CEF 的 User-Agent
user-agent: ""
# CEF 日志输出位置
# 'file' -> 写入 (plugins)/MapBrowser/cef.log
# 'console' -> 写入控制台
chrome-log-output: "file"
# 额外的 CEF 启动参数
custom-chrome-args:
- "--disable-gpu-compositing"
- "--disable-gpu-vsync"
? 链接与致谢
MapBrowser
A powerful Spigot/Paper plugin that brings a modern web browser into Minecraft using maps and the Java Chromium Embedded Framework (JCEF). Interact with any website, watch videos, and even play Minecraft in Minecraft!
✨ Features
- Dynamic Browser Creation: Create interactive browser screens of any size, anywhere in your world.
- Real-time Web Rendering: Powered by the Chromium engine, it renders modern websites with full CSS and JavaScript support.
- Fully Interactive: Click, type, and send key presses (like Enter, Shift) to interact with web pages just like a real browser.
- In-Game Developer Tools: Toggle Chromium DevTools in real-time to debug web layouts and performance on the fly.
- Highly Configurable: Enable remote debugging, set a custom user agent, change user data paths, and add custom CEF arguments via
config.yml.
❗ Dependencies
This plugin requires the MapEngine API to function. Please install it on your server before installing MapBrowser.
⚙️ Installation
- Download and install MapEngine on your server.
- Download the latest
MapBrowser-*-all.jar from the Releases Page or the "Versions" tab.
- Place the downloaded
.jar file into your server's plugins directory.
- Restart your server.
⚠️ Important First-Time Setup:
On its first launch, MapBrowser will automatically download the necessary Chromium Embedded Framework (JCEF) binaries. This process can take several minutes and requires a stable internet connection. Please monitor your console for progress.
? Commands & Permissions
| Command |
Description |
Usage |
Permission |
/mb create |
Creates a new browser screen at the specified location. |
/mb create <x> <y> <z> <url> [width] [height] |
mapbrowser.command.create |
/mb list |
Lists all currently active browser screens. |
/mb list |
mapbrowser.command.list |
/mb remove |
Removes a specified browser screen. |
/mb remove <id> |
mapbrowser.command.remove |
/mb modify |
Modifies the properties of an existing screen. |
/mb modify <id> <prop> [values...] |
mapbrowser.command.modify |
├ url |
Changes the URL loaded by the screen. |
/mb modify <id> url <new_url> |
|
├ devtools |
Toggles the developer tools on or off. |
/mb modify <id> devtools <on|off> |
|
├ pos |
Moves the browser screen. |
/mb modify <id> pos <x> <y> <z> |
|
├ size |
Changes the size of the browser screen. |
/mb modify <id> size <width> <height> |
|
└ refresh |
Refreshes the browser page. |
/mb modify <id> refresh |
|
└ scale |
Setting the scale of browser page. |
/mb modify <id> scale <newScale> |
|
/mb input |
Sends text input to the specified screen. |
/mb input <id> <text...> |
mapbrowser.command.input |
/mb keys |
Sends a key event to the specified screen. |
/mb keys <id> <key> <action> |
mapbrowser.command.keys |
/mb executeJs |
Executes custom JS code or a JS snippet in the specified browser screen. |
/mb executeJs <id> <jsCode|snippet.js> |
mapbrowser.command.executejs |
/mb near |
Lists the ID of the nearest browser screen. |
/mb near |
mapbrowser.command.near |
? Configuration (config.yml)
The configuration file is generated at plugins/MapBrowser/config.yml on the first run.
# --------------------------------------------------- #
# MapBrowser Configuration #
# --------------------------------------------------- #
jcef:
# Your custom JCEF binaries path (leave blank to disable)
# Default: (plugins)/MapBrowser/jcef-bundle
custom-install-path: ""
# Custom jcef-maven download mirror (for custom-builds)
mirror: "https://github.com/Steve3184/mb_jcefbuild/releases/download/v1/"
# Should jcef-maven check the JCEF binaries at startup?
skip-download: false
browser:
# Should we enable the sound (default is false)
enable-sound: false
# CEF's user data directory
# Default: (plugins)/MapBrowser/userdata
user-data-dir: "userdata"
# CEF's remote debugging
remote-debugging:
enabled: false
# Should we enable it? (default is false)
port: 9222
# Remote Debugging Port (default is 9222)
# CEF's User-Agent
user-agent: ""
# Where should CEF output the log
# 'file' -> write to (plugins)/MapBrowser/cef.log
# 'console' -> write to console
chrome-log-output: "file"
# Extra CEF startup args
custom-chrome-args:
- "--disable-gpu-compositing"
- "--disable-gpu-vsync"
? Links & Credits
- Source Code: GitHub Repository
- License:
GNU AGPL v3
- Acknowledgements:
- pianoman911 for the powerful MapEngine library.
- CinemaMod for their pre-built JCEF binaries which greatly simplify development.
评论 0
登录后参与评分
还没有评论,来抢沙发吧