getMap in 1.13

Discussion in 'Spigot Plugin Development' started by Little_seven, Aug 10, 2018 at 11:29 AM.

  1. emm. In Spigot1.13 , getMap(short id) was deprecated. But what function is used instead of? The api did'nt told me
     
  2. Just use it. It will most likely always be there.
     
  3. That's not really how you should see deprecated code.
     
    • Agree Agree x 1
  4. True. However this method has been deprecated for ~5 years now (https://bukkit.org/threads/mappalette-and-getmap-deprecated.179092/), and nothing ever happens.
    Also, it's deprecated for "Magic Value", although there are no magic values. You can't put an enum there, or something else to catalogize. It's just that in Minecraft, there are 65536 unique maps, and you can get each individual one with that method. It's as much a "magic value" as player UUIDs are.

    No, that sets which map the individual Item(Stack) should display. If you want to modify the content of the map, you use Bukkit#getMap, which gives you a MapView, which allows you to change it's MapRenderer.
     
  5. Feel free to submit an issue to remove the deprecation.
     

Share This Page