ItemDropEvent Error!

Discussion in 'Plugin Development' started by Deltateamsoldier, Aug 27, 2014.

Thread Status:
Not open for further replies.
  1. Hey Guys,
    I have a problem with the ItemDropEvent that I cancel
    I get a NullPointerException Error ... Im not at home at the moment, that's why I cant post the error log and source directly.
     
  2. Offline

    Konkz

    How do you except us to help?
    Basically you just said 'I misspelled a word in my essay' and have never given us that essay.

    Nothing we can do without error log or source.
     
  3. Offline

    St3venAU

  4. Konkz
    St3venAU
    Okay .. I made a class with the name JoinItems in my plugin:
    1. If a user joins, he will get an item with custom name and lore
    2. if he rightlick that item, it will open a gui menu ( heres another error if I click into the gui!!)
    3. if he tries to drop the item, the event is cancelled and it works fine but on other items,
    it gives me an error, for example if I drop a diamond sword the error comes!


    is that something with else?
    that I must write what happens if the item doesn't have the special join item with the special name and lore?!

    Error and Source comes at 5:00 PM if I am at home ; )
     
  5. Offline

    Necrodoom

  6. Necrodoom you are online at 5:00PM too? o.0
     
  7. Offline

    St3venAU

    I'd bet you aren't checking if the dropped item has a custom name or lore, I'm betting your plugin is just assuming it does, and when it doesn't (like a normal vanilla sword) you are getting a NullPointerException. You would need to add a check for that.
     
Thread Status:
Not open for further replies.

Share This Page