Icon Menu - Change The Title or Contents Without Reopening The Inventory.

Discussion in 'Plugin Development' started by micrlink, Jan 18, 2014.

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

    micrlink

    How would I go about changing the title of contents of a IconMenu without reopening the inventory, I have tried to reopen the inventory with a new name, but I don't want the cursor moving.
     
  2. Offline

    Timbals

    Think this is what your looking for:

    Code:java
    1. ItemStack item = yourinventory.getItem(0); //Your slot (remember the first slot is 0)
    2. ItemMeta meta = item.getItemMeta();
    3. meta.setDisplayName("new itemname");
    4. item.setItemMeta(meta);
     
  3. Offline

    micrlink

    What about The title of the inventory
     
  4. Offline

    Garris0n

    The client won't let you change the title, you have to re-open it. That's why in my custom menu system there's a check to see if it can first open the next page inside their current window so it doesn't move the cursor. This is accomplished by simply setting the contents inside of the inventory instead of opening a new one.
     
Thread Status:
Not open for further replies.

Share This Page