SOLVED

Discussion in 'Spigot Plugin Development' started by dyenxunit, Jun 2, 2015.

  1. Solved ty sidsub for helping :D
     
    #1 dyenxunit, Jun 2, 2015
    Last edited: Jun 3, 2015
    • Like Like x 1
  2. What is on line 26 of EnchantPoison.java? Whatever it is, something on it is null:
     
  3. Code (Text):
    if(damager.getItemInHand() != null && damager.getItemInHand().getItemMeta().hasLore()){
     
  4. You need to check if the item has item meta before u check if it has a lore, or it will give an error on normal items.
     
  5. It has the .getItemMeta b4 the getlore. The error that I keep getting is when I hit a npc player from citizens using an empty hand
     
  6. Can anyone help me with this please
     
  7. I suggest just trying to add damager.getItemInHand().hasItemMeta() to the if statement
     
  8. To which if statment ?
     
  9. I don't know, you removed your first post.
     
  10. fixed
     
  11. Well... fixed is not the right word, for 2 reasons.

    But where you check the other to for != null
     
  12. i ment i fixed the post not the code sorry for that misunderstanding
     
  13. I meant your post as well, still mean it ;P
     
    • Agree Agree x 1
  14. Yea good point where is my other null XD this is the only one that i have so far if(damager.getItemInHand() != null && damager.getItemInHand().getItemMeta().hasLore()){ do i have to create one b4 this that checks the ItemMeta ?