Solved Chest GUI won't open.

Discussion in 'Plugin Development' started by Philitup321, Oct 19, 2013.

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

    Philitup321

    Hello!!! I am trying to make a plugin that when you right click, it opens up a chest gui, that when the items are clicked, it will teleport you to the designated server. I have successfully coded another gui, so I am not sure why this one is not working. When I right click, the inventory just won't open, and I get an error in console. If anyone could help me, it would be much appreciated.

    Code:http://pastebin.com/brdir7f5
    Error:http://pastebin.com/NiQ4TJpv
     
  2. Offline

    Botifier

    I need full code to help but i noticed theres a NullPointerException at InfinityRealms.java
     
  3. Offline

    DailyLove

    Philitup321 Which is line 1036. Another thing, why are you checking if a PlayerInteractEvent is an instanceof Player. It's already a player just create a variable Player p = e.getPlayer();
     
  4. Offline

    Philitup321

  5. Offline

    newboyhun

    Philitup321
    serv == null
    Did you run the createServInventoryGUI() method anywhere in your code?
     
  6. Offline

    Philitup321

    newboyhun

    No. But I did use createWarpInventoryGUI() if that changes anything
     
  7. Offline

    DailyLove

    Define serv = Bukkt.createInventory();
    outside of the createServInventoryGui() method.

    Because you define it within that method, but in the PlayerInteractEvent it's probably getting the value when you
    first defined it as Inventory serv = null;

    Philitup321
     
  8. Offline

    Philitup321

    I got it! Forgot to put :
    createServInventoryGUI();
    In the onEnable :p

    Thanks for your help DailyLove and newboyhun
     
  9. Offline

    xTonyDude

    Do you think you can share the new code that works?
     
    AaronL98 likes this.
Thread Status:
Not open for further replies.

Share This Page