Actually, you don't even need to store the CraftPlayer here. This whole section could be replaced by the following:

````
            // CraftBukkit start
            if (entity instanceof EntityPlayer && entity1 instanceof EntityPlayer) {
                if (!((EntityPlayer)entity).getBukkitEntity().canSee(((EntityPlayer)entity1).getBukkitEntity())) {
                    continue;
                }
            }
            // CraftBukkit end
````

This also eliminates the need for the CraftPlayer import on line 15.