Citizens2 icon indicating copy to clipboard operation
Citizens2 copied to clipboard

Citizens2-b1180 NullPointerException

Open AnthonyAMC opened this issue 12 years ago • 3 comments

I noticed this in startup ~2s after the server done loading message.

[13:15:03] [Server thread/WARN]: [Citizens] Task #17 for Citizens v2.0.13-SNAPSHOT (build 1180) generated an exception
java.lang.NullPointerException
    at net.citizensnpcs.npc.CitizensNPC.spawn(CitizensNPC.java:192) ~[?:?]
    at net.citizensnpcs.npc.CitizensNPC.load(CitizensNPC.java:119) ~[?:?]
    at net.citizensnpcs.api.npc.SimpleNPCDataStore.loadInto(SimpleNPCDataStore.java:59) ~[?:?]
    at net.citizensnpcs.Citizens$2.run(Citizens.java:295) ~[?:?]
    at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftTask.run(CraftTask.java:71) ~[2014-10-13-14-42-44-spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at org.bukkit.craftbukkit.v1_7_R4.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:350) [2014-10-13-14-42-44-spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:641) [2014-10-13-14-42-44-spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:289) [2014-10-13-14-42-44-spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:584) [2014-10-13-14-42-44-spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:490) [2014-10-13-14-42-44-spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]
    at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [2014-10-13-14-42-44-spigot.jar:git-Spigot-1.7.9-R0.2-207-g03373bb]

AnthonyAMC avatar Nov 06 '14 18:11 AnthonyAMC

        getEntity().setMetadata(NPC_METADATA_MARKER, new FixedMetadataValue(CitizensAPI.getPlugin(), true));

somehow the NPC failed to spawn despite... being spawned. Any details on where the NPC was / why it was spawning / ...?

mcmonkey4eva avatar Nov 06 '14 19:11 mcmonkey4eva

yes... 2 possible reasons. First i think the area where these npcs are is what is being loaded by multiverse as the world spawn. Second, i have a script that's specifically loading the chunks these NPCs are in after the world loads cause i want them to not despawn. Having npcs in the world spawn has been troublesome in the past iirc.

AnthonyAMC avatar Nov 07 '14 01:11 AnthonyAMC

@AnthonyAMC Does this error still occur on latest builds?

mcmonkey4eva avatar Nov 17 '14 05:11 mcmonkey4eva