Menus

Discussion in 'Plugin Development' started by Fl1pzta, Jul 7, 2013.

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

    Fl1pzta

    Is there any way to create menus out of buttons. I've noticed people using the chest interface and using blocks for selection, but that's not exactly what I'm looking for.
     
  2. Offline

    DarkBladee12

    Fl1pzta Nope, that's not possible since menus like the texture pack download are handled client-side :/
     
  3. Offline

    Fl1pzta

    Well, that's no fun. I can't think what would make a good menu.
     
  4. Offline

    xTrollxDudex

    Fl1pzta
    Whaat? Give an example of what you're talking about.
     
  5. Offline

    Fl1pzta

  6. Offline

    xTrollxDudex

    Fl1pzta
    Chest inventory of buttons that can't be taken? Where can this be found?
     
  7. Offline

    Fl1pzta

  8. Offline

    xTrollxDudex

    Fl1pzta
    That was what I was talking about
    Code:java
    1. //create the inventory object
    2. Inventory inv = new CraftInventoryCustom(<player to display to>, <slots, multiple of 9>, <title>);
    3.  
    4. //adding items
    5. inv.addItem(new ItemStack(Material.APPLE, 1);
    6. //to add lore and all is up to you, look up item metas bukkit
    7.  
    8. //you will need a listener for inventory click event to prvent people from taking your items
    9.  
    10. //oncommand or event listener
    11. //provide a player field: (Player) sender or event.getPlayer()
    12. player.openInventory(inv);
    13.  
    14. //inventory close event
    15. //dammit I forgot that one
     
  9. Offline

    Minnymin3

    You can use spout for this type of thing.
     
  10. Offline

    Chinwe

  11. Offline

    Fl1pzta

    chinwe Lol yes we already established that.

    Minnymin3 I'd rather make a plugin that the general population in minecraft would use.
     
  12. Offline

    Minnymin3

    Then you need to do an icon inventory like stated above.
     
Thread Status:
Not open for further replies.

Share This Page