1.12.2 Create an inventory using nms

Discussion in 'Spigot Plugin Development' started by Nico12, Feb 15, 2020.

  1. Hi spigot people, I was looking for a way to create a chest inventory using nms, but I haven't found the way, could you help me?
     
  2. Just why? Why not creating an inventory using the API?
     
    • Like Like x 1
  3. I think it would have been better to have explained this, but what I need is to make an inventory with an animated title, but I haven't found a way to do it with bukkit
     
  4. If there were a way to do it (directly) in nms, there would be a way to do it in the API.
    I think the only option is opening a new inventory each time.
     
    #4 robertlit, Feb 15, 2020
    Last edited: Feb 15, 2020
  5. Not sure if this would work for the title but works for items within the inventory, create your inventory using the api and have a task running to update the title and also update the inventory for anyone who is currently viewing the inventory using Inventory#getViewers() and Player#updateInventory()


    Nvm just noticed you can't change the title once it's set.
     
  6. The problem is that there is no method to set the inventory's title
     
  7. Yeah just noticed that.