Hey. I have such a question, how can I render a map and stick it in an ItemFrame? I need to make it so that in this ItemFrame was placed a picture from the folder, which I will indicate. Could you tell me how to do this? I use it final ItemFrame iFrame = (ItemFrame) e.getPlayer (). getWorld (). spawnEntity (loc, EntityType.ITEM_FRAME);
@ewrs Well, you would need to create your own MapRenderer to render the image, and then add that renderer to the maps that need that image. This was something I already did for my one of my plugins. I'd recommend you look at the util below to see how it is done, and then either copy and paste the utils into your own project, or just download that plugin and use it as an API. The MapRenderer: https://github.com/ZombieStriker/Pl...er/pluginconstructor/CustomImageRenderer.java The util for creating an setting the maps: https://github.com/ZombieStriker/Pl...ie_striker/pluginconstructor/MapWallUtil.java
I decided with the rendering, but didn’t understand how I can upload a picture from the FOLDER and insert it into ItemFrame through the ItemStack
Find a file in the folder, turn it into a BufferedImage, then you should be able to use the util class that Zombie_Striker provided.
@ewrs Then what error do you get? Because "That is error" is not enough to tell what is wrong so we can fix it.
@ewrs And if you hover your mouse over the error, does it give quick fix suggestions? Are the classes in the same package?
Create a class, interface, etc. Yes UDP: Everything, I understood a mistake and solved it. But I still have a couple of questions. I will write them later. UPD2: Hi again. I did it, thank you. But now there is a question. Can I update the map and write on it online of another server on the bungee? Or will I need to create my own pictures from 1/100, 2/100, etc.?