I have been making an anti bot that works ok. Not the best though. Sometimes it kicks players with invis but here is how it is:
public void onEvent(event e)
{
if(e instanceof EventUpdate)
{
if(!this.toggled) {
return;
}else {
for(Object entity : mc.theWorld.loadedEntityList)
if(((Entity) entity).isInvisible() && entity != mc.thePlayer && !((Entity) entity).canBeAttackedWithItem()) {
mc.theWorld.removeEntity((Entity)entity);

}

}


}}

I want to be able to narrow it down a bit more so if any1 can help, please tell me.