I'm making a plugin but i get a error. Do somebody have a fix? class: Code:java package me.Ricardo.WalkingCraftCore.Listeners; import org.bukkit.entity.Entity;import org.bukkit.entity.EntityType;import org.bukkit.entity.Player;import org.bukkit.entity.Zombie;import org.bukkit.event.EventHandler;import org.bukkit.event.Listener;import org.bukkit.event.entity.CreatureSpawnEvent;import org.bukkit.event.entity.EntityDamageEvent;import org.bukkit.potion.PotionEffect;import org.bukkit.potion.PotionEffectType; /*** Created by Ricardo on 2/3/14.*/public class Zombies implements Listener { @EventHandler public void onPlayerDamage(EntityDamageEvent e) { Player p = (Player) e.getEntity(); if (e.getEntity() instanceof Player) { if(e.getCause().equals(EntityDamageEvent.DamageCause.ENTITY_ATTACK)) { //Get the attack cause. for(Entity ent : p.getNearbyEntities(1.5D, 1.5D, 1.5D)) //Check nearby entities for possible damagecause { if((ent instanceof Zombie)) // If it equals to a zombie (almost only close range mob which counts as ENTITY_ATTACK) { p.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 30, 1)); //Add the PotionEffect p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 10, 1)); //Add the PotionEffect e.setDamage(3.5); } } } } } } And the error: Code: [17:29:38 ERROR]: Could not pass event EntityDamageByEntityEvent to WalkingCraft Core v1.0A org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:320) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav a:62) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.j ava:481) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j ava:466) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callEvent(Craf tEventFactory.java:98) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989j nks] at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.callEntityDama geEvent(CraftEventFactory.java:386) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4 a588b7-b2989jnks] at org.bukkit.craftbukkit.v1_7_R1.event.CraftEventFactory.handleEntityDa mageEvent(CraftEventFactory.java:414) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13- g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityLiving.damageEntity(EntityLiving.j ava:656) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityMonster.m(EntityMonster.java:99) [ craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityZombie.m(EntityZombie.java:218) [c raftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.PathfinderGoalMeleeAttack.e(PathfinderGo alMeleeAttack.java:100) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989 jnks] at net.minecraft.server.v1_7_R1.PathfinderGoalSelector.a(PathfinderGoalS elector.java:108) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityInsentient.bn(EntityInsentient.jav a:427) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityLiving.e(EntityLiving.java:1436) [ craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityInsentient.e(EntityInsentient.java :306) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityMonster.e(EntityMonster.java:20) [ craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityZombie.e(EntityZombie.java:152) [c raftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityLiving.h(EntityLiving.java:1299) [ craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityInsentient.h(EntityInsentient.java :150) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityMonster.h(EntityMonster.java:24) [ craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.EntityZombie.h(EntityZombie.java:214) [c raftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.World.entityJoinedWorld(World.java:1338) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.World.playerJoinedWorld(World.java:1319) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.World.tickEntities(World.java:1207) [cra ftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.WorldServer.tickEntities(WorldServer.jav a:480) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.u(MinecraftServer.java:6 37) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.DedicatedServer.u(DedicatedServer.java:2 50) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.t(MinecraftServer.java:5 45) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.MinecraftServer.run(MinecraftServer.java :457) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] at net.minecraft.server.v1_7_R1.ThreadServerApplication.run(SourceFile:6 17) [craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] Caused by: java.lang.ClassCastException: org.bukkit.craftbukkit.v1_7_R1.entity.C raftVillager cannot be cast to org.bukkit.entity.Player at me.Ricardo.WalkingCraftCore.Listeners.Zombies.onPlayerDamage(Zombies. java:24) ~[?:?] at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) ~[?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1 .7.0_51] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51] at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.ja va:318) ~[craftbukkit.jar:git-Bukkit-1.7.2-R0.2-13-g4a588b7-b2989jnks] ... 29 more