Error
PureTryOut opened this issue ยท 11 comments
I've had this error recently:
2012-04-29 10:56:04 [SEVERE] Could not pass event EntityDamageByEntityEvent to AntiShare
org.bukkit.event.EventException
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
at org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDamageEvent(CraftEventFactory.java:363)
at org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(CraftEventFactory.java:381)
at net.minecraft.server.EntityLiving.damageEntity(EntityLiving.java:608)
at net.minecraft.server.EntityAnimal.damageEntity(SourceFile:124)
at net.minecraft.server.EntityEgg.a(EntityEgg.java:26)
at net.minecraft.server.EntityProjectile.F_(EntityProjectile.java:156)
at net.minecraft.server.World.entityJoinedWorld(World.java:1265)
at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:106)
at net.minecraft.server.World.playerJoinedWorld(World.java:1247)
at net.minecraft.server.World.tickEntities(World.java:1154)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:542)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftChicken cannot be cast to org.bukkit.entity.Player
at com.turt2live.antishare.ASListener.onEntityDamage(Unknown Source)
at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
... 15 more
The server didn't crash and everything else was working fine. Any idea what the problem is?
Well it seems that the error is because of throwing an egg to a mob.
I tried that again and now it gives me this error:
18:46:30 CONSOLE: [SEVERE] Could not pass event EntityDamageByEntityEvent to AntiShare
18:46:30 CONSOLE: java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftSheep cannot be cast to org.bukkit.entity.Player
And ingame it says "You cannot hit other players!" while i'm hitting a sheep with the egg.
I can't replicate this.
If you can provide more information that I may be doing wrong, I'll reopen this.
Here is what I did:
- Logged in as OP
- Used the mob spawning eggs to spawn 30 cows, 30 pigs, and 30 zombies
- Deopped myself, and logged out
- Waited a few seconds, and logged back in
- From creative mode I gave myself the chicken eggs
- Spam threw the eggs at the crowd
Not once did I get "You cannot hit players" or any errors in the console
Well first of all of course I configured I couldn't do any damage to mobs/players from creative mode.
For the rest everything is the same as you did (except for the spawning but I don't think that has anything to do with it).
I used the default configuration, it may be possible you somehow configured something to react weirdly.
Can you pastebin a copy of your config? Be sure to censor your SQL settings if you are using SQL.
(I shortened this for you - Turt2Live)
CB: This server is running CraftBukkit version git-Bukkit-1.2.5-R1.2-b2167jnks (MC: 1.2.5) (Implementing API version 1.2.5-R1.2)
AS: 3.2.1