CitizensDev/Citizens — Issue #561: Null Pointer Exception upon User Logging off the server with NPC selected.
Author: zarkenstudios
Created: 2011-12-31 22:43:38+00:00
State: open

This was seen on a freshly generated CraftBukkit server running the latest build version 1597. No alterations were made to the citizens mod, and this is after multiple restarts of the server also (not sure that part matters). This consistantly happens when the user logs off the server. Not sure if it's only when the last user logs off or when anyone logs off, but the server currently only has myself on it so I can't test that idea.

[WARNING] Task of 'Citizens' generated an exception
java.lang.NullPointerException
at net.citizensnpcs.resources.npclib.NPCSpawner.despawnNPC(NPCSpawner.java:116)
at net.citizensnpcs.resources.npclib.NPCManager.despawn(NPCManager.java:75)
at net.citizensnpcs.guards.types.Bodyguard.despawn(Bodyguard.java:81)
at net.citizensnpcs.guards.types.Bodyguard.teleportHome(Bodyguard.java:117)
at net.citizensnpcs.guards.types.Bodyguard.updateStatus(Bodyguard.java:56)
at net.citizensnpcs.guards.Guard.updateStatus(Guard.java:137)
at net.citizensnpcs.guards.GuardTask.run(GuardTask.java:23)
at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:493)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)