Solved What will be replacing the depreciated functions in Bukkit?

Discussion in 'Plugin Development' started by Musaddict, Jun 9, 2014.

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

    Musaddict

    Specifically,

    block.getData()
    block.getTypeId()
    block.setData()
    block.setTypeId()

    I've been out of the game for the past year, jumping back in now, and I notice that these are all depreciated. Looked in the API and all I could find was "Magic value". Looking in the bukkit updates, and all I can see is information on the new UUID system. As far as I can see, there aren't any replacements for these block functions.

    There's data that I need to call for and set in pretty much all my plugins, so what new functions can I use to make the switch to the new API?
     
  2. Offline

    Musaddict

    Hate to bump, but I could really use an answer on this, or at least a pointer to someone who can provide one.
     
  3. Offline

    JaguarJo

    Moved to Plugin Development. You might get more answers here.
     
  4. Offline

    xTigerRebornx

    Musaddict Material replaced ids (though I don't believe CB has done the actual change to String-based ids), MaterialData (and its subclasses) is the alternative to the data values.
     
  5. Offline

    The Fancy Whale

    Yes I do believe you are supposed to use block.getType() instead of block.getTypeId().
    Also, what are you using block.getData() for? I might be able to find an answer for you of an alternate way of doing whatever you need.
     
  6. Offline

    Musaddict

    Thanks! I see now that getColor() is used for wool and stuff, instead of needing to get the meta data.

    Got it figured out I think. Our plugins deal with colored wool, and another plugs into World Edit schematics, so we were just looking into what was needed once getData() was removed. I now know that, wool for example, you can simply call for the color instead of translating the block's meta data.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 8, 2016
Thread Status:
Not open for further replies.

Share This Page