Solved Crate Plugin HELP!

Discussion in 'Spigot Plugin Development' started by NiekGC, Jun 3, 2017.

  1. Try adding debug massages to see if the code triggers
     
  2. If i click with an diamond on the diamond block nothing happens...
    And no errors in the console
     
  3. Not sure why it's not fully loading but I can see two errors at least. Your Open class needs an @EventHandler added above your
    onPlayerInteract method and your Open class doesn't need Listener implemented in the class.
     
  4. TY soooooooooooooo Much for your reaction!!!!!!!!!!!!!!!!!!!!!!!
    <3
     
  5. Quiet welcome! Also you want to use p.getItemInMainHand() as your way is now deprecated since 1.9 when shields were implemented.
     
  6. Yes, but if you want to mantain 1.8 compatibility (which most public developers want) they tend to use deprecated methods. I use a method called

    getItemInHand(Player p) that checks what version ur using and based of that returns the proper itemstack
     
    • Like Like x 1