Hey! I need help with my Inventory GUI Please help :)

Discussion in 'Bukkit Help' started by Hypeeez, Mar 24, 2014.

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


    Okay so i made a inventory GUI to select my kits for my kit plugin i made and i set it so you right click with a compass to open it, this all works but how would i make it so when they do /kits it opens the Inventory too?
  2. Offline

    Brett Basinger

    1. public boolean onCommand(CommandSender sender, Command cmd, String commandLabel, String[] args) {
    2. if (cmd.getName().equalsIgnoreCase("kit"))
    3. {
    4. if ((sender instanceof Player))
    5. {
    6. Player player = (Player) sender;
    8. kits.clear();
    10. ItemStack pvp = new ItemStack(Material.DIAMOND_SWORD);
    11. ItemMeta pvpMeta = pvp.getItemMeta();
    12. pvpMeta.setDisplayName(ChatColor.DARK_PURPLE + "PvP");
    13. ArrayList<String> pvplore = new ArrayList<String>();
    14. pvplore.add("Slay The Nubs and Call Them EZ!");
    15. pvpMeta.setLore(pvplore);
    16. pvp.setItemMeta(pvpMeta);
    17. kits.setItem(0, pvp);

    this wat i use

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


    Thanks for the reply, but this didn't help with my Inventory GUI.
Thread Status:
Not open for further replies.

Share This Page