Solved Could not pass event PlayerInteractEntityEvent

Discussion in 'Spigot Plugin Development' started by AppleMonJeans, Jan 12, 2018.

  1. Its because if you dont have the lightning rod (or another item with a custom name) getDisplayName will return null and error.
  2. so if i make another if statement before checking if it dosent have item meta it should fix?

    EDIT: Nevermind i just added a check to see if it has itemmeta before
  3. Yep, check if the item in their hand is null
  4. Don't check just for meta because that could be lore in which case the error would still fire. You can still get the item meta if all of it's aspects are null so check specifically if it has a displayname before checking what the dn is.
  5. yea i noticed that, but i got it fixed now. Thanks for the help!