[UNSOLVED] Custom Inventory Help [HELP]

Discussion in 'Plugin Development' started by Mig_B, Aug 13, 2013.

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

    Mig_B

    So my problem is that when i open the inventory, all works, but when I close it and reopen there's 2 of each items, and my second problem is that when i click the itemstack of charms which is a book, it won't open the charms Inventory. Any help?

    Code:java
    1. @EventHandler
    2. public void onSelectorClickEvent(InventoryClickEvent event){
    3. Player p = (Player) event.getWhoClicked();
    4. if (event.getInventory().getTitle().equals(ChatColor.GOLD + "Spell Category Selector")) {
    5. if(event.isRightClick() || event.isLeftClick()){
    6. event.setCancelled(true);
    7. }
    8. }
    9. else if(event.getInventory().equals(select)){
    10. if(event.getCurrentItem().equals(Theme.charms)){
    11. p.closeInventory();
    12. p.openInventory(charmInv);
    13. }
    14. }
    15. }
     
  2. Offline

    WazzapDoc

    Maybe I could do something like that in my future plugins so can I know as well so I could learn a bit?
     
  3. Offline

    Mig_B

    I have seen some servers like Mine of duty with the class selector. Would be cool if I could make something like it.

    Bump

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

    Mig_B

    I would need help with this please :S Bump
     
  5. Offline

    Mig_B

    Anyone can help me with this? It's something I need to complete my plugin so Bump :S
     
Thread Status:
Not open for further replies.

Share This Page