How to update lore from an inventory?

Discussion in 'Plugin Development' started by MrGG4ming, Apr 12, 2017.

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

    MrGG4ming

    Hi, I am trying to create a mysql-based system in my database. I have a problem with the following situation: The inventory I created is a store and in the item lore it would contain information like value and quantity. System that I can update is this information automatically so I used mysql .. And it worked, but the only thing that did not happen was the update of the lore of the item, but when I make the purchase it takes the value of mysql correctly .. How do For items lore to update automatically? Or by command?
     
  2. Offline

    Ragnarok_

    Okay, so I think I get what you're trying to say, is that you want the lore of your custom inventory, or Bukkit#createInventory() to be updated. What you could do, if I'm understanding your question right, is just reopening the inventory after you set it's ItemMeta. So you'd use p#openInventory() and I'm pretty sure that basically updates it, worked when I thought of it. I'm not so sure about p#updateInventory(), I think that only updates the player's actual, real inventory.
     
Thread Status:
Not open for further replies.

Share This Page