ImgMap
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!) https://github.com/CirnoTheGenius/ImgMap-LosingPixels
Examples
Caveat: I post this to help fellow users of this plugin do a thing that I did, but I am NOT the plugin developer so things I say here could be mistaken.
If you already had permanent images (via the -p option or the MapsDefaultPermanent option in the config.yml file) generated with older versions, and they reverted back to their map image after the update, you CAN get them back the way they were because the URL data is still there after the upgrade but its in a different format and under a different filename which is why the plugin doesn't see them anymore. You can edit the files behind the scenes and get those images back. Here's how:
Note, since I run on a linux server, I did the above with the following shell commands, but I gave it in detail above like that so people could do it manually or write their own scripts in their own OS's preferred way:
On another unrelated note:
The config.yml option "MapsDefaultPermament: true" doesn't seem to work anymore. This is why you now have to give the "-p" option explicitly when before you didn't if you had that in your config file.
@OtterTrotter Keep in mind that this wasn't developed for Spigot and was initially created for Bukkit.
As someone who has tried to compile plugins for Bukkit I can tell you just how frustrating it is when the code changes. I'm sorry that ImgMap doesn't work on spigot but there isn't much we can do to help.
However, since the source code is available, try asking around for people to help you recompile this for spigot. You may find someone willing to help.
Getting the following error on startup with spigot 794, imgmap V2B.1
2013-04-17 08:50:41 [SEVERE] Exception in thread "Thread-20" 2013-04-17 08:50:41 [SEVERE] java.lang.NullPointerException 2013-04-17 08:50:41 [SEVERE] at com.tenko.ImgMap$1.run(ImgMap.java:105)
The images reset every time the server restarts. So it kinda ruins the plugin.
@poiNt3D And about "picture" how will this look /give user 395:google.com lol ? You can give them number of item NOT advanced map like this
The maps aren't being saved after a server restart. Is this intentional? Can you make it so it does stay?
Edit: getting this error in console when starting the server with ImgMap:
2013-04-16 13:03:52 [INFO] [ImgMap] Enabling ImgMap v2
2013-04-16 13:03:52 [INFO] git-Bukkit-1.4.7-R1.0-94-g141dcf0-b2735jnks (MC: 1.5.1)
2013-04-16 13:03:52 [SEVERE] Exception in thread "Thread-28"
2013-04-16 13:03:52 [SEVERE] java.lang.NullPointerException
2013-04-16 13:03:52 [SEVERE] at com.tenko.ImgMap$1.run(ImgMap.java:105)
@nejcneo
You can use another plugin for this.
Can you add option, when player join for frist time. Get Map in Inventory (Using it for rules)
@OtterTrotter
Update to latest build, be sure to put -p AFTER the url, and make sure the plugin directory "IMGMAP" has proper write permissions. If this doesn't work then without a server log I can't help you.
ImgMap V2B.1
if you had checked the newest update you wouldn't have this issue. "v2B.1: Started compiling for 1.5.1 Beta build. Fixed bug due to stupidity pertaining to persistent single-image maps. Implemented a disabled animation feature."
Tried -p, didnt even work, not even my last map made was kept.
Could you maybe do commands like:
/viewmap <MAP NAME> /addmap <MAP NAME> /maplist /delmap <MAP NAME>
Would be pretty cool if users could see certain maps other users have made!
the /map url -p only seems to work for last one you do. (lastest version) I did multiple ones and after reboot it only shows last one I did, rest is default again.....pfff :(
java.lang.NullPointerException at com.tenko.ImgMap$1.run(ImgMap.java:105)
HELP If you reboot the server, the image disappears.
craftbukkit 1.5.1 r0.2 서버를 재부팅하면 이미지가 사라집니다.
@OtterTrotter
Try /map <url> -p
Images i create on maps reset after a server restart. Using spigot 775, imgmap V2B for 1.5.1.
I tried multiple times with multiple images. I have the maps hanging on walls in item frames.
@MCwolski Shoot, I keep forgetting to implement local pictures. On to-do list as top priority.
@dogbig Releasing it soon; I haven't checked on this project in a bit because of school work.
To all: I've managed to get animations to work. However, per md_5's request, I will not implement any video streaming. Also, the poll will be deleted; I will start compiling for 1.5.1 only. If you need a 1.4 Jar, contact me, however, I advise updating to 1.5.1.
@FrauKoujiro
Thanks for updating!
Btw, could you recover a feature for loading local picture instead of URL?
syntax like this @Maximvdw
Also, I find OP can't use /map if not being given permissions.
I‘m using v2B for 151.
Give us please build with persistent maps...
@h0us3cat
Thank you for notifying me. Updated.
Just saying, your plugin.yml is outdated on github.