HomeJavaModsMapReflectionAPI
MapReflectionAPI
ModsJava

MapReflectionAPI

An API to display custom images on maps!

⬇ Download on HangarOpen in MCModsHubGet it on Google Play →
# **MapReflectionAPI** **An API to view custom images on maps!** ### **What can you do with MapReflectionAPI?** This API enables developers to show custom images on maps in an itemframe. It uses packets and NMS to make sure you get the best performance. ***The API is a fork of [MapManager](https://www.spigotmc.org/resources/api-mapmanager.19198/). It updates the API to 1.19 and uses other dependencies.*** ### **How to use MapReflectionAPI?** ```java //Wrap image MapWrapper wrapper = MapReflectionAPI.getMapManager().wrapImage(ImageIO.read(new File("image.png"))); MapController controller = wrapper.getController(); final Player p = Bukkit.getPlayer("SBDeveloper"); //Add viewer try { controller.addViewer(p); } catch (MapLimitExceededException e) { e.printStackTrace(); return; } controller.sendContent(p); //Show in frame ItemFrame frame = ...; //This is your ItemFrame. controller.showInFrame(p, frame, true); //Or show in hand controller.showInHand(p, true); ``` It's also possible to split one image onto multiple itemframes. For example, using the following code: ```java //--- Wrap image (into 2 rows and 2 columns) --- MultiMapWrapper wrapper = MapReflectionAPI.getMapManager().wrapMultiImage(ImageIO.read(new File("image.png")), 2, 2); MultiMapController controller = wrapper.getController(); final Player p = Bukkit.getPlayer("SBDeveloper"); //--- Add viewer --- try { controller.addViewer(p); } catch (MapLimitExceededException e) { e.printStackTrace(); return; } controller.sendContent(p); //--- Show in frames --- //These are your itemframes ItemFrame leftTopFrame = ...; ItemFrame leftBottomFrame = ...; ItemFrame rightTopFrame = ...; ItemFrame rightBottomFrame = ...; ItemFrame[][] frames = { {leftTopFrame, rightTopFrame}, {leftBottomFrame, rightBottomFrame} }; controller.showInFrames(p, frames, true); ``` ------------------- ***Attention! This plugin is owned by SBDeveloper and may not be resold or posted anywhere else.*** Ideas, tips, bugs, ...? Send a private message to SBDeveloper or react in the Discussion!

MapReflectionAPI is a free Minecraft Java mod. Compatible with Minecraft 1.12, 1.12.1, 1.12.2, 1.13 and newer. Downloaded 46 times (via Hangar). Download it and open it directly in the game.

Explore more