MapPalette and getMap() - deprecated

Discussion in 'Plugin Development' started by kiwhen, Oct 1, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    kiwhen

    This whole "magic number"-thing is slowly driving me crazy, because of the complete lack of documentation. I'm sure it's nice that it's being sorted out, but there are times...

    For now, I'm trying to figure out the MapPalette constants. These are basically the same as ChatColor-colors, but they have all become deprecated. Last time I checked, the reason there are separate values, is that maps cannot render all the colors that the chat can, and some colors are different. I have my own enum that translates between the two, so I can use ChatColors in my custom maps, and get the closest possible result. Now of course, the whole thing is throwing warnings all over the place. What do I use instead?

    As a bonus, Bukkit.getMap() has become deprecated. Is there any other way of retrieving MapViews?
     
  2. Offline

    desht

    Deprecated doesn't mean gone, and deprecation warnings don't stop compilation.

    Although I consider it poor form to deprecate parts of an API without there being a replacement, in this case there is no replacement as of yet, so just continue to use those deprecated methods. When there's a suitable replacement (in the case of maps, the whole concept of "map ID <=> item durability" is going away), then migrate to that.
     
    kiwhen likes this.
Thread Status:
Not open for further replies.

Share This Page