How to fix this inventory update bug

Discussion in 'Spigot Plugin Development' started by Remixful, May 29, 2017.

Thread Status:
Not open for further replies.
  1. [​IMG]
    (Bottom right of the image)
    I have a GUI that is updating item meta constantly. The problem is that the new item lore is shown to the player seconds later. Which makes a huge difference for what I'm trying to create. So, I found out that I could do Player#updateInventory(), but now I have this annoying bug. Is there any way to fix this?
     
  2. Try sending the update packet manually (for the lore itself) and don't use #updateInventory (which will attempt a full inventory resend).
     
  3. Is there a way to maybe hide the player's hand, or at least the item in the player's hand so it doesn't glitch out like that?
    There may be times I want to update the items positions and item meta so I don't find that useful for future uses.
     
  4. So update meta, set item in a different slot, and clear the old slot?
     
  5. I learned how to use ProtocolLib and now the problem is fixed. Thank you.
     
    #5 Remixful, May 29, 2017
    Last edited: May 30, 2017
Thread Status:
Not open for further replies.