jrbudda / Sentry

Citizens2 Town Sentry Character
12 stars 20 forks source link

NullPointerException Error - Sentry 1.8 #185

Closed uledrith closed 10 years ago

uledrith commented 10 years ago

Since updating to Sentry 1.8, I'm getting ridiculous amounts of server console errors. I'm using latest dev version of Craftbukkit 1.7.2 and Citizens.

http://mcmonkey4eva.dyndns.org/paste/556

jrbudda commented 10 years ago

I've been unable to reproduce this error. It's got something to do with mounted sentries and the npc thinking it's spawned but the entity is null... could you give me an idea of how many sentries you have, how many are mounted, and when exactly the errors occur?

OneClassyNinja commented 10 years ago

I had a a similiar case where I came up with this

07.01 15:54:56 [Server] WARN Task #20 for Sentry v1.8.0 generated an exception 07.01 15:54:55 [Server] INFO java.lang.NullPointerException

over and over.

It was a problem with the NPC #20. I despawned it, but as jrbudda pointed out, it appeared the entity was null. I went into my "saves" file in the citizens file, copy and pasted an npc, renamed the id of the npc #20, changed the location of the NPC, opened up the server and removed it again. Now my server properly got rid of the npc and the problem is gone for now.

So for you uledrith, I'd try going into the saves file and remaking an NPC with an id of #107 (as yours is throwing out #107 instead of me, which was #20). Then once you've restarted your server, go back and delete that NPC in the game.

jrbudda commented 10 years ago

Should be fixed in latest Citizens version.