ItemStack getTypeId() is Deprecated

Discussion in 'Plugin Development' started by Glumpz, Apr 18, 2014.

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

    Glumpz

    I need to save items into a file and I'd like to store them via item id's but that method is deprecated. I would still use it but I have no idea if it is planned to be removed. Any help would be great on what I should do or if that method is actually going to be removed.
     
  2. Offline

    adam753

    Item ID's are being phased out of Minecraft (and therefore out of Bukkit too) to be replaced with strings. You should store its name rathr than its ID.
     
  3. Offline

    Glumpz

    adam753 So I should store it's material type?
     
  4. Offline

    adam753

    Yep.
     
  5. Offline

    Glumpz

    adam753 And just to clarify, the material ids that I'll be saving won't be phased out with the upcoming 1.8 Bukkit versions correct?
     
  6. Offline

    adam753

    Glumpz
    I don't know when IDs will be phased out of bukkit, they've been deprecated for a long time and I'm pretty sure minecraft doesn't have them anymore. Generally though you should always avoid using deprecated methods if you don't want to have to rewrite your plugin in the near future.
     
  7. Offline

    Glumpz

    adam753 Yeah that's what I am trying to avoid, rewriting in the future. Thanks for the help!
     
  8. Offline

    RawCode

    anything involved in magic numbers marked deprecated
     
  9. Offline

    Garris0n

    They will be ambiguous per world because of the mod/plugin API, at least that's what Mojang said.
     
  10. Offline

    Glumpz

    Garris0n Ah okay, I think that'll be quite interesting when, and if, the API comes out. :p
     
Thread Status:
Not open for further replies.

Share This Page