Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- You see this code? It's working with the damage on zombies but I get an error if I hit the egg on a player. It says "CraftPlayer Cannot be cast to org.bukkit.entity.zombie" How do I fix this?
- @EventHandler
- public void Egg(EntityDamageByEntityEvent e) {
- if ((e.getDamager() instanceof org.bukkit.entity.Egg)) {
- Zombie ent = (Zombie) e.getEntity();
- if (ent instanceof Zombie) {
- e.setDamage(10);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement