I want to give a player a map upon joining the server and then the map will display custom text and images. Is there anyway I could get a small pseudocode or something?
What i found: http://jd.bukkit.org/doxygen/d0/d9c/interfaceorg_1_1bukkit_1_1map_1_1MapCanvas.html That looks promising =)
@TheTrixsta let me link you to this. There's some kind of chicken and egg problem: We need a MapCanvas to render but we don't know how to create it...
You don't need to ever create a MapCanvas - there's more info on the thread @V10lator linked to, but in summary: You can use Bukkit.getMap() or Bukkit.createMap() to get yourself a MapView object. The map id you pass to getMap() is the map item's durability value (http://jd.bukkit.org/apidocs/org/bukkit/inventory/ItemStack.html#getDurability()) You need to create a class which extends the Bukkit MapRenderer abstract class, and implement the render() method. That method is passed the MapView, a MapCanvas (already created for you!) and the Player that is holding the map. You do all your drawing in there. Now you can add your custom renderer to the MapView for the map in question with the MapView addRenderer() method. You will probably also want to remove the vanilla map renderer with the removeRenderer() method. You can use player.sendMap(mapview) in your render() method (usually at the end) to send all changes at once - if you don't, you'll see the map redraw itself slowly, like an ordinary map does. Do be careful not to spend too much time in the render() method, and don't call player.sendMap() unless there's actually a new image to send - render() gets called every tick that a player is holding a map up, and you don't want to cause lag.
Im still not understading this , do you have and pseudo code, i dont know where to update the map the player is holding :/