Ratismal / MoneyThief

MoneyThief plugin - Bukkit
MIT License
2 stars 4 forks source link

Could not pass event EntityDeathEvent to MoneyThief v1.2.13 #8

Closed ebins closed 8 years ago

ebins commented 9 years ago

Constantly getting this error message. I'm running Java 8. Thanks!


[Server thread/ERROR]: Could not pass event EntityDeathEvent to MoneyThief v1.2.13 org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:310) ~[spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:502) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:487) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at org.bukkit.craftbukkit.v1_8_R3.event.CraftEventFactory.callEntityDeathEvent(CraftEventFactory.java:377) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.EntityLiving.die(EntityLiving.java:874) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.EntityLiving.damageEntity(EntityLiving.java:812) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.EntityMonster.damageEntity(EntityMonster.java:42) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.EntityHuman.attack(EntityHuman.java:1001) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.EntityPlayer.attack(EntityPlayer.java:1063) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.PlayerConnection.a(PlayerConnection.java:1355) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.PacketPlayInUseEntity.a(SourceFile:52) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.PacketPlayInUseEntity.a(SourceFile:11) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.PlayerConnectionUtils$1.run(SourceFile:13) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_40] at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_40] at net.minecraft.server.v1_8_R3.SystemUtils.a(SourceFile:44) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:715) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] at java.lang.Thread.run(Unknown Source) [?:1.8.0_40] Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(Unknown Source) ~[?:1.8.0_40] at java.util.ArrayList.get(Unknown Source) ~[?:1.8.0_40] at io.github.ratismal.moneythief.EntityKillerListener.searchConfig(EntityKillerListener.java:145) ~[?:?] at io.github.ratismal.moneythief.EntityKillerListener.onDeath(EntityKillerListener.java:68) ~[?:?] at sun.reflect.GeneratedMethodAccessor201.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_40] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_40] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.8.8.jar:git-Spigot-76236cb-62a2169] ... 21 more [16:52:47] [Server thread/INFO]:

Ratismal commented 9 years ago

This is an issue with a mob dying that isn't listed in the config. I've tried streamlining the error in a previous version, but my attempt didn't work. Will fix this as soon as I'm able to develop again.

In the meantime, can you elaborate on what causes this? You mention it's constantly, does this mean that it randomly happens out of nowhere or that it is triggered by something?

Ratismal commented 9 years ago

Just as a status update: My workspace seems to have balanced itself out and is usable now. I've fixed the system that is supposed to intercept that stacktrace. If it has an issue with a mob missing in the config, it will notify you that it is missing or added incorrectly, and tell you exactly the mobname that is missing. There will be a config option to disable this message, to prevent spam.

However, I'm having issues with metrics. The site is currently down, and was down a few weeks ago when I checked last as well. While it is down I cannot build the plugin unless I remove it from the code. I'm not sure if it has been consistently down, but I'm reluctant to release a build without metrics. If this issue persists I'll release the update as a beta build, but I'd like to give it a little more time before doing that.

I apologize for any inconveniences this may have caused. I'll keep this issue open until I release a fixed build.

ebins commented 9 years ago

Hi thanks. I use MythicMobs plugin, so this may be what it is. Thanks a lot for your response :)

PS - yes, its a triggered response. (thought it was random because I never knew what the error message referred to, but now that you explained, I'm sure its a triggered event. Players just kill a lot of mobs on my server, so I see that error message almost constantly)

ebins commented 9 years ago

Love the plugin, btw. Thank you for it!

Edit: I was thinking, in the case of plugins like MythicMobs, maybe it would be possible to code a default entry, something that fits all non standard mobs? I don't pretend to be a coder like yourself, and don't know how you have everything set up, but maybe having a default variable that is something like

If standardMob (do this) { else - creeper (or what ever)? }

I coded way back in the day (I'm old lol) but no idea how Java has it now or how much work that would be for you.

Thanks again! I'll be donating when I have some extra cash.

PS - I think metrics has been down for a while now. Other plugins are having issues when trying to update, and I've read similar remarks from other authors. But this is just me as an end user. I don't know the status of metrics - if its been abandoned or what.

Ratismal commented 9 years ago

It would be very possible to do something like that, however I'm hesitant to as there might be a case where the server owner doesn't want rewards to be given for unlisted mobs. I could allow the use of a "default" entry though. Thanks for your feedback!

EDIT: Metrics has indeed been down for a while, but it is up sporadically. Right now it is down again, but I managed to grab it as a dependency in the short window that it was up. All is good!