Adding items to a Chest gui. Help Needed!!

Discussion in 'Plugin Development' started by MrGiGimz, Aug 26, 2013.

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

    MrGiGimz

    Hello, so I have this:


    Code:
    if (commandLabel.equalsIgnoreCase("chest")) {
    if (p.hasPermission("uhc.deluxe")) {
    if (p.getInventory().getItemInHand().getType() == Material.COMPASS) {
    Inventory kitchest = Bukkit.createInventory(p, 27,
    "Deluxe User's Chest");
     
    p.openInventory(kitchest);
    }
    } else if (!p.hasPermission("uhc.deluxe")) {
    p.sendMessage(ChatColor.RED
    + "-=-ERROR! You are not a Deluxe Player!-=-");
    }
    }
    
    I was wondering if it is possible to add items to the chest in the chest gui when a player is holding a compass and trypes /chest AND has the uhc.deluxe permissions? Well thanks for everyones help!
     
  2. Offline

    Napkin222

    Code:java
    1. kitchest.add(new ItemStack(Material.DIAMOND_SWORD, 1));
     
Thread Status:
Not open for further replies.

Share This Page