Creating Menus

Discussion in 'Plugin Development' started by scarabcoder, Dec 6, 2013.

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

    scarabcoder

    I want to create a quick menu, like the type in Mineplex. You right click with a clock in Mineplex, and you can choose your lobby. I want to make one of those type of menus, and I was wondering how. Can someone tell me how?
     
  2. Offline

    Gater12

  3. Offline

    Wolfey

    Code:java
    1.  
    2. // Create inventory
    3. Inventory inv = Bukkit.createInventory(null, size<must be divisible by 9>, "name");
    4.  
    5. // Add item to inventory
    6. inv.addItem(new ItemStack(Material.APPLE, 1));
    7.  
    8. // Whatever else you want to do with the inventory.
    9.  
     
  4. Offline

    scarabcoder

    I know how to make a custom inventory, I was just looking for the right inventory events.
     
  5. Offline

    mrkirby153

    scarabcoder

    You would use inventory click event and check if the item clicked is equal to a special item, close the inventory and do stuff
     
  6. Offline

    scarabcoder

    mrkirby153 I see, but if the player picks up an item in the custom inventory, wouldn't that drop the item when the inventory closes? And random question, but how do I close the inventory?
     
  7. Offline

    PogoStick29

  8. Offline

    scarabcoder

    Thanks PogoStick29!
    EDIT: I watched the video, and its REALLY cool. I watched your NPC one too. Your videos are AWESOME.
     
    PogoStick29 likes this.
Thread Status:
Not open for further replies.

Share This Page