InventivetalentDev / CompactNPCLib

Library to create NPCs
MIT License
22 stars 9 forks source link

Rabbit Spawn Exception #4

Closed InventivetalentDev closed 8 years ago

InventivetalentDev commented 8 years ago

Rabbit throws exception when trying to spawn

https://paste.inventivetalent.org/iqiliwunok.log

[23:52:07 INFO]: [NPCLib] Injected NPCEntityRabbit as NPCEntityRabbit with id 101
[23:52:07 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'spawnnpc RABBIT' in org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand(spawnNpc)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:148) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.dispatchCommand(CraftServer.java:646) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PlayerConnection.handleCommand(PlayerConnection.java:1348) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PlayerConnection.a(PlayerConnection.java:1183) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:45) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PacketPlayInChat.a(PacketPlayInChat.java:1) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.PlayerConnectionUtils$1.run(SourceFile:13) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_73]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_73]
        at net.minecraft.server.v1_10_R1.SystemUtils.a(SourceFile:45) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.D(MinecraftServer.java:733) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.DedicatedServer.D(DedicatedServer.java:399) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.C(MinecraftServer.java:672) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:571) [spigot.jar:git-Spigot-6016ac7-10c10b3]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_73]
Caused by: org.inventivetalent.pluginannotations.command.exception.UnhandledCommandException: Unhandled exception while invoking command method in org.inventivetalent.npclib.command.SpawnCommands@3f4c58e4#spawnNPC
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand.onCommand(AnnotatedCommand.java:172) ~[?:?]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand.execute(AnnotatedCommand.java:432) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        ... 14 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: argument type mismatch
        at org.inventivetalent.npclib.registry.NPCRegistry.spawnNPC(NPCRegistry.java:56) ~[?:?]
        at org.inventivetalent.npclib.registry.NPCRegistry.spawnNPC(NPCRegistry.java:69) ~[?:?]
        at org.inventivetalent.npclib.command.SpawnCommands.spawnNPC(SpawnCommands.java:43) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand.onCommand(AnnotatedCommand.java:168) ~[?:?]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand.execute(AnnotatedCommand.java:432) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        ... 14 more
Caused by: java.lang.IllegalArgumentException: argument type mismatch
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_73]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_73]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[?:1.8.0_73]
        at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[?:1.8.0_73]
        at org.inventivetalent.npclib.registry.NPCRegistry.wrapAndInitEntity(NPCRegistry.java:142) ~[?:?]
        at org.inventivetalent.npclib.registry.NPCRegistry.spawnNPC(NPCRegistry.java:54) ~[?:?]
        at org.inventivetalent.npclib.registry.NPCRegistry.spawnNPC(NPCRegistry.java:69) ~[?:?]
        at org.inventivetalent.npclib.command.SpawnCommands.spawnNPC(SpawnCommands.java:43) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_73]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_73]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_73]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand.onCommand(AnnotatedCommand.java:168) ~[?:?]
        at org.inventivetalent.pluginannotations.command.AnnotatedCommand$BukkitCommand.execute(AnnotatedCommand.java:432) ~[?:?]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) ~[spigot.jar:git-Spigot-6016ac7-10c10b3]
        ... 14 more
InventivetalentDev commented 8 years ago

The NPC annotation referenced Horse entities. Fixed by https://github.com/InventivetalentDev/CompactNPCLib/commit/63130c8fe2b6c9a812bd672da1011990543a4dfb