private boolean isMineshafterPresent(){
  try {
    Class.forName("mineshafter.MineServer");
    return true;
  }
 catch (  ClassNotFoundException e) {
    return false;
  }
}

private boolean isMineshafterPresent ( ) { try { Class . forName ( "mineshafter.MineServer" ) ; return true ; } catch ( ClassNotFoundException e ) { return false ; } }
check if mineshafter is present . if it is , we need to bypass it to send post requests
