you need a onLoop and you would need to create a switch-case for your getState()
@Override
public int onLoop() throws InterruptedException {
switch(getState()){
case STEAL:
break;
case DROP:
break;
case WALK_STALL:
break;
case POCKET:
break;
}
return random(250, 600);
}
this:
State getState() {
if(condition 1) return State.POCKET;
}
And look through the Inventory and GroundItems API they are helpful
Example:
GroundItem g = getGroundItems().closest("");
/**
remember to null check
**/