Solved ItemMenu Spacing

Discussion in 'Plugin Development' started by ShadowLAX, Aug 6, 2013.

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

    ShadowLAX

    Hello bukkit, I just recently asked how to make an ItemMenu. Now that I know how, I am wondering how to put spacing in between the Icons. If you want an example, Hypixel's server and his compass menu has a space at the beginning. Like that, but in other places than just in the first slot. Thanks!
     
  2. Offline

    NathanG_

    ShadowLAX
    It depends on how you are making your item menu, are you using a lib or coding it all yourself?
     
  3. Offline

    ShadowLAX

    NathanG_ it's not an lib, I can give you an example of what I'm using:

    Code:java
    1. public static Inventory inv = null;
    2.  
    3. public static void createInventoryGUI() {
    4.  
    5. inv = Bukkit.createInventory(null, 54, ChatColor.GREEN + "Kits");
    6.  
    7. inv.addItem(Material.WOOD_SWORD, 1);


    Bump, please help D:

    help please! D:

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  4. Offline

    david_rosales

    Do inv.set(item, slot);
    Dont have my comp right now so it should be something like that. The slot and item might be flipped. Also.. it might not be set but something near that. Lastly.. the slot: 0 means the 1st slot. 1 means the 2nd slot. Etc.. make zure you dont exceed the max number of slots for the inventory.
     
  5. Offline

    ShadowLAX

    david_rosales Thank you! It worked, but the inv.setItem was inv.setItem(Slot,Item);. And thanks for that information on the slots, I had no idea about that.
     
Thread Status:
Not open for further replies.

Share This Page