Solved Update the GUI

Discussion in 'Spigot Plugin Development' started by Giorgino, Feb 20, 2020.

  1. Hi everyone, I'm trying to update the GUI without closing it and then opening it. The problem is that I can't take the GUI title.
     
  2. As in you cannot get the title?

    Code (Text):
    Inventory#getView().getTitle()
     
    • Useful Useful x 1
  3. I can use inv.getTitle () but not getView
     
  4. My bad, I believe it's actually for the event. It's actually
    Code (Text):
    InventoryClickEvent#getView().getTitle()
    I believe that should work for most if not all inventory based events
     
    • Useful Useful x 1
  5. I can't use the event since I'm creating a method to update the GUI.
     
  6. You can't change the name of an inventory unless it belongs to a tile entity whose BlockState implements Nameable. If that's all true though, you can cast the BlockState to Nameable and set its custom name that way, which should be reflected in the inventory title.
     
    • Useful Useful x 1
  7. What's your current code? Are you getting any errors?
     
    • Useful Useful x 1
  8. SOLVED THANKS TO ALL
     
    #8 Giorgino, Feb 20, 2020
    Last edited: Feb 20, 2020