Errors on load when former mythic mob has been deleted
tmellen opened this issue ยท 15 comments
I used to have a mythic mob named "EarthEle" (Short form of Earth Elemental). I deleted that mob, and ever since I get the following error (This also happened when I deleted a different mob too, but forgot it was deleted, and couldn't figure out the error). I believe this is happening because of the removal of the mob from mythic mobs, but it's still somewhere loaded in the mobhunting DB.
21.04 19:41:26 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_Necromancer.name) in language file hu_HU.lang
21.04 19:41:26 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_ExplosiveZombie.name) in language file hu_HU.lang
21.04 19:41:26 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_Shadow.name) in language file hu_HU.lang
21.04 19:41:26 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_Guard1.name) in language file hu_HU.lang
21.04 19:41:26 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_EarthEle.name) in language file hu_HU.lang
21.04 19:41:26 [Server] WARN [MobHunting] Task #1402 for MobHunting v5.6.2 generated an exception
21.04 19:41:26 [Server] INFO java.lang.NullPointerException: null
21.04 19:41:26 [Server] INFO at one.lindegaard.MobHunting.mobs.ExtendedMob.getMobName(ExtendedMob.java:93) ~[?:?]
21.04 19:41:26 [Server] INFO at one.lindegaard.MobHunting.Messages.injectMissingMobNamesToLangFile(Messages.java:178) ~[?:?]
21.04 19:41:26 [Server] INFO at one.lindegaard.MobHunting.Messages.injectMissingMobNamesToLangFiles(Messages.java:148) ~[?:?]
21.04 19:41:26 [Server] INFO at one.lindegaard.MobHunting.MobHunting$1.run(MobHunting.java:318) ~[?:?]
21.04 19:41:26 [Server] INFO at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:76) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
21.04 19:41:26 [Server] INFO at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:353) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
21.04 19:41:26 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
21.04 19:41:26 [Server] INFO at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
21.04 19:41:26 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
21.04 19:41:26 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
21.04 19:41:26 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
21.04 19:41:36 [Server] INFO Successfully reloaded loot tables, advancements and functions
I hope I found a fix for your problem. Please test build 625 or newer
https://fractal.lindegaard.one:8181/job/MobHunting/
Same thing on snapshot 628:
22.04 09:51:44 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_SkeletalMinion.name) in language file hu_HU.lang
22.04 09:51:44 [Server] INFO [MobHunting] Creating missing key (mobs.SmartGiants_SmartGiant.name) in language file hu_HU.lang
22.04 09:51:44 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_StaticallyChargedSheep.name) in language file hu_HU.lang
22.04 09:51:44 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_Necromancer.name) in language file hu_HU.lang
22.04 09:51:44 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_ExplosiveZombie.name) in language file hu_HU.lang
22.04 09:51:44 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_Shadow.name) in language file hu_HU.lang
22.04 09:51:44 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_ThePintor.name) in language file hu_HU.lang
22.04 09:51:44 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_Guard1.name) in language file hu_HU.lang
22.04 09:51:44 [Server] WARN [MobHunting] Task #1403 for MobHunting v5.6.3-SNAPSHOT-B628 generated an exception
22.04 09:51:44 [Server] INFO java.lang.NullPointerException: null
22.04 09:51:44 [Server] INFO at one.lindegaard.MobHunting.mobs.ExtendedMob.getMobName(ExtendedMob.java:93) ~[?:?]
22.04 09:51:44 [Server] INFO at one.lindegaard.MobHunting.Messages.injectMissingMobNamesToLangFile(Messages.java:176) ~[?:?]
22.04 09:51:44 [Server] INFO at one.lindegaard.MobHunting.Messages.injectMissingMobNamesToLangFiles(Messages.java:148) ~[?:?]
22.04 09:51:44 [Server] INFO at one.lindegaard.MobHunting.MobHunting$1.run(MobHunting.java:318) ~[?:?]
22.04 09:51:44 [Server] INFO at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftTask.run(CraftTask.java:76) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
22.04 09:51:44 [Server] INFO at org.bukkit.craftbukkit.v1_12_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:353) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
22.04 09:51:44 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:739) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
22.04 09:51:44 [Server] INFO at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
22.04 09:51:44 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
22.04 09:51:44 [Server] INFO at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577) [spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
22.04 09:51:44 [Server] INFO at java.lang.Thread.run(Thread.java:748) [?:1.8.0_152]
22.04 09:51:54 [Server] INFO Successfully reloaded loot tables, advancements and functions
How did you delete the MythicMobs - it looks to me like the Mobs is not completely deleted?
I have deleted a MythicMob on my test-server, and in this case I get this message when I start the server and i get no errors except that
[15:19:08 INFO]: [MobHunting][Debug] The mob=BunBuns can't be found in MythicMobs configuration files
I figured it had something to do with the mob having an achievement record, but no longer existing in the game...
Either way, it's still happening. May not be on removed mobs. :/ I'm going to clean up my Mythic Mobs and see if I can pinpoint further later tonight when players aren't online.
The weird thing is -- it looks like it updated the en_US.lang and zh_CN.lang files fine. it's just the hu_HU.lang file that craps out.
How did you delete the MythicMobs - it looks to me like the Mobs is not completely deleted?
It was removed from the spawners, it's still an available mob, just no longer in the world. It's completely removed now, and now "guard1" is causing the issue. Guard1 is a valid mob, stationed at a guard post with a spawner. I'm looking at him right now. :)
I use the mythicmob api to examine if it knows the mobname, so if you only delete the mob partly from the mythicmob config files it will causr problems
You could try to delete the guard1 from mobhuntings mythicmobs_rewards.yml file this might solve the problem too. Maybe.... :-)
Ok. Cleaned up spawns and mobs. Still happens. On Server boot or on /MH reload. The en_US.lang file gets updated correctly, but then it fails on hu_HU.lang. The file doesn't get modified or saved. Neither does zh_CN.lang at that point.
I've removed mobs directly from the en_US.lang file, and when I /MH reload, they get added back just fine, then it fails on hu_HU.lang. (ex: mobs.MythicMobs_AngrySludge.name=Angry Sludge)
3.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_AngrySludge.name) in language file en_US.lang
23.04 08:27:46 [Server] INFO [MobHunting] Updated en_US.lang language file
23.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_SkeletalKnight.name) in language file hu_HU.lang
23.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_SkeletonKing.name) in language file hu_HU.lang
23.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_SkeletalMinion.name) in language file hu_HU.lang
23.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.SmartGiants_SmartGiant.name) in language file hu_HU.lang
23.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_Necromancer.name) in language file hu_HU.lang
23.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_ExplosiveZombie.name) in language file hu_HU.lang
23.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_Shadow.name) in language file hu_HU.lang
23.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_ThePintor.name) in language file hu_HU.lang
23.04 08:27:46 [Server] INFO [MobHunting] Creating missing key (mobs.MythicMobs_Guard1.name) in language file hu_HU.lang
23.04 08:27:46 [Server] ERROR null
23.04 08:27:46 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'mh' in plugin MobHunting v5.6.3-SNAPSHOT-B628
23.04 08:27:46 [Server] INFO at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46) ~[spigot-1.12.2.jar:git-Spigot-2086bb0-21d5f75]
I found the problem. Not exactly the problem -- but I will shortly. The cause of it doesn't appear to be MobHunting, but MythicMobs. When I want to save data on a mob that I've removed, I rename the file from "mobname.yml" to "mobname.save"... MythicMobs is still reading in all of those files, even though they aren't named ".yml" I have a ton of mobs out in files that are inactive, that MM continues to attempt to load, or load incorrectly, because the files aren't complete. Sigh. I'll let you know what the end result is.
Ahhh yes, this explains why Mobhuntnig finds the mobs eventhough you had "deleted" the mobs :-)
I mocked up a test server at 0 mobs and went through 55 reboots, adding 1 mob back each time. Every mob I've ever created and that I am still loading works fine (including the guard and earth elemental). It was a mob in the Halloween "Spooky Pack" download from the MythicMobs website. A two part mob, where both phases of the mob have the same name. It sits in wait as the top mob, then when approached, spawns the second half. Both have the same DISPLAY name, which I believe is the problem, because that's the name you're putting in the translation files.
PumpkinFiend:
Type: HUSK
Display: '&cPumpkin Fiend'
Disguise:
Type: BLOCK
Block: PUMPKIN
PumpkinFiend-Body:
Type: CAVE_SPIDER
Display: '&cPumpkin Fiend'
Disguise:
Type: SPIDER
Invisible: TRUE
So, two things we discovered today:
- Mythicmobs reads in ANY file in it's mobs/skills/spawners folders, not just .yml files. Keep it clean!
- MobHunting can't have two Mythicmobs with the same DISPLAY Name.
Easy fix on my part (rename one half or delete the mob). I'm no longer getting the language file error on startup, in in-game "/MH reload" now returns "Configuration Reloaded" instead of an error.
I guess the problem still exists though -- People can have the following setup as mythic mobs, which is contextually acceptable:
OrcWarrior:
Display: "Orc"
OrcPriest:
Display: "Orc"
OrcSorcerer:
Display: "Orc"
This would grant each one different access to different skills, but all the players would see in-game is "Orc" so they wouldn't know if it was a priest, warrior, etc.
This would in turn crash MobHunting.