Solved Packet for rendering maps?

Discussion in 'Spigot Plugin Development' started by MrIvanPlays, May 22, 2019.

Thread Status:
Not open for further replies.
  1. Is there a way to force the player render a map after he joined and that rendered map replace the empty map in his hand?

    I'm doing that on 1.14.1
     
  2. This is not about my thing. I have the rendering stuff already, but i want to force the player to right click on a empty map, which will render a new one and replace the empty map in the player's hand to the rendered map.
     
  3. You could use Player#sendMap(MapView) to open a MapView, first you can replace the empty map with the new ItemStack and then open the MapView using Player#sendMap(MapView)
     
  4. I need the rendered map in the player's hand.
     
  5. Just render the map into a MapView and set the player's map's view into your view.
    org.bukkit.inventory.meta.MapView#setMapView(MapView map)
     
  6. I tried this and got class cast exception when i cast the meta.
     
  7. I forgot. Material.MAP represents an empty map. You have to make the item with Material.FILLED_MAP instead.
     
  8. Thanks, solved.
     
    • Like Like x 1
Thread Status:
Not open for further replies.

Share This Page