ImgMap:在游戏地图中渲染任意图片!
作者:Evangon、Maximvdw 和 JohnnyBlu
最初源于 md_5 的一张“Troll Face”( Troll 脸)图片,此插件允许手持地图的用户(显然需具备相应权限)将图片实质上绘制到地图上。 图片可以是任何内容:说明、规则、消息、警告、一张非常漂亮的猫咪照片,或者你喜欢的任何东西!所有图片都会被调整为 128x128 的正确尺寸。随后,图片会被发送至渲染进程(开发者们:如果想了解具体实现方式,请查阅源代码),接着该地图便会渲染出这张图片。拥有相同 ID 的地图持有者(通常鼠标悬停时会显示,例如“地图 #0”)也能看到相同的图片!这一切的唯一缺点是,由于 Minecraft 地图本身的特性,它们不支持全彩显示。这是由于客户端自身的限制所致。
安装
只需将其放入 /plugins/ 文件夹即可!无需特殊配置!
使用方法
- 给自己一张具有特定 ID 的地图。这个 ID 可以是任意值,但请记住,一旦在其上绘制了图片,它仅适用于该特定 ID!
- 获取所需图片的 URL!这里有些人容易出错。为了让插件成功渲染,链接必须是图片的直接链接。只需右键点击图片并点击“复制图片地址”。
- 手持具有上述特定 ID 的地图,输入 "/drawimage" 然后粘贴链接!对于大多数用户来说,粘贴操作是 "CTRL+V"。
- 稍等片刻;渲染可能需要一些时间。你会注意到地图上出现几个区块;这表明正在加载中。 如果没有任何反应,你可能会收到类似“服务器内部错误”的消息,或者面对一张空白地图。如果你因“服务器内部错误”消息被踢出,请在控制台中输入 "fixmap <你的特定ID>"。这基本上会使用旧的过世世界渲染方式修复地图。再试一次;如果仍然无效,请在评论区报告! 然而,如果完全没有任何反应,请确保图片可以从浏览器直接访问(操作前请清除缓存!)有时会发生的情况是,网站所有者设置了权限,禁止任何人直接访问该图片。这有点麻烦,但你或许可以保存图片并上传到其他位置。不过,这样做时,请务必遵守这些图片的版权使用规定!
- 搞定!你的地图现在就有了那张可爱的猫咪照片或其他内容了!
命令
- /drawimage <图片URL>
将指定图像绘制到你手持的地图上。如果你想“保存”图片到地图,只需在命令末尾添加“-s”。之所以将“save”(保存)加上引号,是因为它实际上并没有真正保存地图上的图像;它只是将 URL 及其对应的 ID 保存到平面文件中,并在启动时加载。
- /drawanimatedimage <gif url> 尝试绘制动态 GIF 图像。虽然偶尔会有些小 bug,但大部分情况下都能正常工作!请注意,这会占用大量带宽(你几乎每秒都在发送 0 到 16k字节的流量),并且非常消耗资源!
- /drawytvideo <yt-ID> 实验性功能。下载视频并将其转换为 GIF 格式。有关更多信息,请参阅 /drawanimatedimage,因为使用了相同的处理流程。
- /emulategb <rom name> 高度实验性功能。在地图上模拟 GameBoy(仅限 GameBoy,不包括 GameBoy Advance 或 GameBoy Color)游戏。完全集成,无需客户端模组!点击聊天中给出的消息来控制模拟器。
- /emuaction <save|load|a|b|left|right|up|down|holdinput>
模拟在地图上运行的 GameBoy 模拟器游戏的输入。通过游戏手柄使用,你也可以选择将其作为命令来调用。请注意,“save”(保存)和“load”(加载)功能目前尚不可用。任何输入按钮都会模拟相应的操作。“holdinput” 命令会使模拟器表现为玩家按住方向键的状态,且仅限方向键。
- /clearmap 手持地图时执行此命令,可清除地图上的图像,并恢复为 Minecraft 原有的地图渲染效果。
- /fixmap <id> 一个调试命令。如果某张地图导致问题并被伪封禁?别担心!只需获取问题地图的 ID,然后输入此命令,将 <id> 替换为该地图的 ID。它与 /clearmap 类似,但这次你可以直接针对特定地图进行操作!
- /getmap <id> 这更像是一个调试命令,但对某些用户可能有帮助。它允许你通过几乎任意 ID 获取一张地图。之所以说是“几乎”,是因为如果你尝试获取的 ID 超过了现有地图的最大编号,系统只会跳过该 ID 并获取下一个可用的 ID,而不是你想要的目标。这是 Minecraft 本身的限制,我无法修复。
权限
- imgmap.*: 授予 ImgMap 几乎所有的权限。但不包括调试命令。
- imgmap.debug: 授予 ImgMap 的调试权限。不包括绘制或还原图像的能力。
- imgmap.drawimage: 允许你将图像绘制到地图上。
- imgmap.drawanimatedimage: 允许你将动画图像绘制到地图上。
- imgmap.clearmap:允许你清除一张地图并恢复主世界渲染。
- imgmap.debug.fixmap:调试命令。允许你移除指定地图 ID 上的所有渲染器。
- imgmap.debug.getmap:调试命令。允许你通过任意 ID 获取一张地图。
开发者/贡献者源码
发现了一个想要自行修复的 Bug?欢迎 Fork 本项目!(请别真的用叉子刺我!)
示例


即将推出的功能
ImgMap: Render any image on an in-game map!
By Evangon, Maximvdw, and JohnnyBlu
Originally coming from a picture of a troll face by md_5, this plugin allows a user with a map in hand (obviously with the proper permissions) to essentially put an image onto the map. The image could be anything: Instructions, rules, messages, warnings, a very nice picture of a cat, whatever you want! All images are resized to the proper dimension of 128x128. The image is then sent over to a rendering process (Devs: Check the source on how it's done if you want), which then the map renders the image for that map. Anyone with a map with the same ID (Typically, it says when you hover over it, e.g "Map #0") to see the same image too! The only downside to all of this is that due to the nature of Minecraft maps, they do not support full color. This is due to a limitation on the clients themselves.
Installation
Just drop it into the /plugins/ folder! No special configuration needed!
How to use
- Give yourself a map with a specific ID. This ID can be anything, but remember, once you draw an image on it, it will pertain only to that specific ID!
- Get the URL of the desired image! This is where some people mess up. In order for the plugin to successfully render it, it has to be a direct link to the image. Simply right click on the image and hit "Copy Image Location".
- Hold the map with the super specific ID and type in "/drawimage" and paste it! For most users, to paste, you do "CTRL+V".
- Wait a bit; rendering can take a bit. You'll notice several segments appear on the map; this it indicating that it's loading. If nothing happens, you're either met with a message that says something along the lines of "Server Internal Error" or you're staring a blank map. If you get kicked with the message with "Server Internal Error", simply type, in console, "fixmap <your super specific id>". This basically fixes the map with the old over world rendering. Try again; if it doesn't work, report it in the comments! However, if you are getting nothing, be sure the image is accessible directly from your browser (clear your cache before you do so!) Sometimes, what happens is that the owner of the website has set privileges denying anyone from accessing the image directly. A bit bothersome, but you can probably save the image and upload it somewhere else. However, when doing so, please follow the copyright usage on said images!
- Viola! Your map now has that pretty picture of a kitty or something!
Commands
- /drawimage <image url> Draws the specified image to the map you're holding. If you want to "save" the picture to the map, you add "-s" to the end of the command. The reason why "save" is written in quotations is because it doesn't actually save the map's picture; it simply saves the URL and it's corresponding ID to a flatfile and is loaded on start up.
- /drawanimatedimage <gif url> Attempts to draw an animated gif image. A little buggy here and there, but it works for the most part! Please be warned that this takes up a lot of bandwith (You're sending anywhere between 0 to 16kilobytes nearly every second!) and that it also is resource intensive!
- /drawytvideo <yt-ID> Experimental. Downloads a video and converts it to a GIF format. See /drawanimatedimage for more information as the same process is used.
- /emulategb <rom name> Highly experimental. Emulates a GameBoy (only GameBoy, not GameBoy Advanced or GameBoy Color) game on a map. Fully integrated, no client mods needed! Click on the chat messages given in chat to control the emulator.
- /emuaction <save|load|a|b|left|right|up|down|holdinput> Simulates input for emulated GameBoy games on a map. Used by the gamepad, you can also use it as a command if you wish. Note that "save" and "load" do not work as of current. Any input button just simulates input. "holdinput" makes the emulator act as if the person is holding down a directional button and directional only.
- /clearmap With a map in hand, this command wipes the image off of it and puts the old Minecraft map rendering back.
- /fixmap <id> A debug command, Caused an issue with a map that psudo-bans them? No worries! Simply get the ID of the problematic map, and type this command in, replacing <id> with the map's id. It's like /clearmap, only this time, you can target maps!
- /getmap <id> More of a debug command, but can be helpful for some, it allows you to get a map by almost any ID. The reason why this is "almost" is because if you try to get a map that is above the number that exists, it merely just goes over and gets the next ID, rather than the one you want. This is something that's within Minecraft that I cannot fix.
Permissions
- imgmap.*: Grants almost all rights to ImgMap. This does not include debug commands.
- imgmap.debug: Grants debugging rights to ImgMap. Does not include drawing or restoring capabilities.
- imgmap.drawimage: Allows you to draw an image to a map.
- imgmap.drawanimatedimage: Allows you to draw an animated image to a map.
- imgmap.clearmap: Allows you to clear a map and restores the overworld rendering.
- imgmap.debug.fixmap: Debug command. Allows you to remove all renderers on a given map ID.
- imgmap.debug.getmap: Debug command. Allows you to get a map by any ID.
Source for Developers/Contributors
Found a bug that you want to squash yourself? Go ahead and fork me! (Please don't actually stab me with a fork!)
Examples

Upcoming Feature
下载 ImgMap
下载 ImgMap
下载 ImgMap
下载 ImgMap
下载 ImgMap
下载 ImgMap
下载 ImgMap
下载 ImgMap
下载 ImgMap
下载 ImgMap
06092015-a
此为实验性构建版本
请预期可能出现错误、漏洞等情况。 图像绘制功能可用,视频功能也可用;但需要外部库支持。该库目前无法直接下载,且可能永远无法直接下载(取决于 Curse 是否允许提供原生库的外部下载链接)。 使用外部库时,请注意:
- 在 Windows 系统下,您的路径中必须包含包含 FFmpeg DLL 的文件夹。
- 在 Linux 系统下,我认为仅通过包管理器安装 FFmpeg 即可。然而,您需要通过克隆 GitHub 仓库自行编译该库( )。要编译,您必须已安装 FFmpeg(同样,我认为它附带了必要的头文件)。之后,您可以使用 makefile 进行编译。
- OSX 系统不受支持。您可能可以参照 Linux 的步骤操作,但我无意支持基于 OSX 的服务器。
请注意,视频功能属于极度实验性的特性,依赖于原生代码,可能导致服务器发生严重崩溃,即服务器会立即退出。
关于变更内容:
- 代码进行了大幅修改。
- 支持 1.8 R3 和 R2;但暂时移除了对 =1.7 版本的支持。
- 地图在您运行时会自动保存。它们还会将图像(未调整大小)直接保存到 /plugins/cache/ 目录下的磁盘驱动器中,从而在加载时无需网络连接。目前尚无法更改此行为;这已被列入待办事项。
- 现在可以轻松地将图像分布在多张地图上;语法如下:"/drawimage <imageURL> -mm:#OfMapsInX:#OfMapsInY"。多图映射的图像也会自动保存到磁盘,并在启动时为每张地图加载。
- 一段非官方、不受支持且默认禁用的 GameBoy 模拟器流媒体代码隐藏在明处。您无法访问它,若尝试通过源代码强制启用,将会导致错误。
实验性构建版本。
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
插件
PacketEvents 是一款专为 Minecraft Java 版打造的协议库,旨在简化数据包的处理与传输。
插件
ExyliaPlugins 的库。
插件
通过对话框或铁砧界面帮助你的 Anthme
插件
重新定义服务器上的生物运输方式。使用高度可定制的口袋道具,安全地捕获、存储和释放任何实体。
插件
为基于 Spigot/Paper/Folia 的服务器添加对 Vivecraft 的支持
插件
用于绘制游戏内地图或在浏览器中随探索实时进行地图绘制的实时地图。
评论 0
登录后参与评分
还没有评论,来抢沙发吧