Hat Plugin Not Giving Me Hat

Discussion in 'Plugin Development' started by cosmicARTS, Sep 6, 2014.

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


    So... I am making a hats plugin as a gadget for my plugin, and when I open the inventory the hat doesn't come on and the inventory doesn't close... I have no idea what the problem is and I never get error messages .-. Help me please! I think it is a simple error.

    Here is my Events Class:


    Here is my Main Class:

  2. Offline


  3. Offline


    bump! COME ON
  4. Offline


    Error log?
  5. Offline


    Ummm did you sort of... you know... read what I said? I didn't get an error log D:
  6. Offline


    • No need to uncancel the event (this might even break another event handler).
    • Do not close the inventory in the click event, schedule a 0 tick delayed task (runTask, for example) in which you close it.
    • Do not instantly open inventories when you just closed one. Once more, schedule a 0 tick delayed task opening one.
    • After you close the inventory, I assume you want to return; instead of continuing execution.
    • Check if the following are null/available (in the format "method call, check you need to perform")
      • getCurrentItem(), check if not null
      • getItemMeta(), hasItemMeta()
      • getDisplayName(), hasDisplayName()
    • After setting items, it might sometimes be necessary to call updateInventory()
    • Have you even debugged the code? For example, print out the current item's name, or the slot number
  7. Offline


    fireblast709 Well well well. Fireblast strikes again! You are awesome dude. You have most likely solved each of my Bukkit questions xD Let me try some of these fixes and get back to you!
Thread Status:
Not open for further replies.

Share This Page