http://www.osbot.org/api
Read through the API, .isntEmpty() isn't a method.
Switch basically means switch around the different cases so:
switch(random(1, 30)) {
case 1:
//do if random(1, 30) produces 1
break;
case 2:
//do if random(1, 30) produces 2
break;
}
So for this if getState() method returns the State State.DROP; then it will call the Drop case and execute whatever is written in there.
and i think you are misreading, its not in the onStart() it is its own method.