Want a better Minecraft server? Read about SpigotMC here!
Separate names with a comma.
Discussion in 'Spigot Plugin Development' started by LazyDev, Oct 13, 2016.
Hello Spigot community,
Iam Wondering If this easy to Develop
"The requested attachment could not be found"
EDIT: you fixed it, no it's probably very hard
It depends what level of a developer you are. If you're a beginner I imagine it would be pretty hard
Sent from my iPhone using Tapatalk
It would be quite difficult, even for somebody experienced.
well it's only an image. You can just use a template for the image itself, and draw over that for the custom elements such as your scores. Moreover, maps should be reasonably well documented.
Actually, this isn't too difficult to make. I have once made a plugin which can render image files onto maps.
(Definitely not an anime fan)
They have probably made a template in e.g. Photoshop and drew on the image.
Still I would suggest you to work with Images in Java first (especially GUIs and using BufferedImages and get their pixel color). Then you should look at how maps work. Maybe I can find my code but I learned it by decompiling and LEARNING (not stealing) plugins and how they modify maps.
It's also important to note that the custom renderer you have applied to the image will NOT stay after a restart (maybe even reload but I'm not sure).
But will things that you change with java's Buffered image API be visible to the clients?
I remember doing it like this:
Bukkit map renderers have a canvas on which you can draw. They have a height and width of 128px. I then took a BufferedImage and copied the colors from it to the Canvas (only once and not every tick as Minecraft does it to reduce pointlessly used performance). So you can't just do MapRenderer#render(BufferedImage img) (or how this class was called). You need to implement it first. I'll lookup the code..
In fact, there is a method to draw an image onto that canvas.
Its MapCanvas#drawImage. If your image is 128*128 (which I suggest) then just use canvas.drawImage(0,0,img);
This is doable. I'm thinking of using MapCanvas.drawImage and the MapCanvas.drawText. drawImage renders the image on the background and drawText will display the numbers. With a little bit of math (for positioning the text), a bit of research and an image to use, you can get this done fairly easily.
That should be a resource, it looks pretty damn cool
Please read this post the next time you post something in this section of the forum.
Why do you remind him? I dont think he broke any rules..
He means the title: [QUESTION] doesn't really say people what the Thread is about...
That's hard!! Someone should make a lib/api xD
The tools provided by the Spigot API to do this kind of stuff, is good enough. With a little bit of research you can get this done in a few hours or less.