Update Inventory

Discussion in 'Plugin Development' started by 8thDimension, Aug 1, 2011.

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

    8thDimension

    I'm working on a plugin that deals with a player's inventory.
    Basically what happens is that whenever they right click a sign, it takes an item away from them, and gives them a reward. Unfortunately the inventory doesn't update visually. It updates however when I try placing that block or I move it around in the inventory.

    To fix this, I'm using
    player.updateInventory()
    But I understand it's deprecated.

    Is there any other way I can update a player's inventory? For now I'll just use updateInventory but it irks me a bit since it is deprecated.

    Thanks in advance :3
     
  2. Offline

    Tster

    There is a craft bukkit method for this somewhere ;P
     
  3. Offline

    8thDimension

    :O What is it?
     
  4. Don't worry about it being deprecated. The only reason they marked it as deprecated is because they use a somewhat hacky work around to update instead of fixing Notch's code at the source.
     
  5. Offline

    Acrobot

    Nope,
    player.updateInventory() is right - it is just deprecated, because it's a temporary solution to a "bigger problem"
    EDIT: Riight. Ninja'd. That's what happens when you have a tab opened for a bit :p
     
  6. I know what you mean :D
     
  7. Offline

    8thDimension

    Alrighty :p
    I guess I'll just use it for now :3
     
Thread Status:
Not open for further replies.

Share This Page