private Sprite createTitleSprite(){
  final String titleType=entity.getTitleType();
  final int adminlevel=entity.getAdminLevel();
  Color nameColor=null;
  if (titleType != null) {
    if (titleType.equals("npc")) {
      nameColor=new Color(200,200,255);
    }
 else     if (titleType.equals("enemy")) {
      nameColor=new Color(255,200,200);
    }
  }
  if (nameColor == null) {
    if (adminlevel >= 800) {
      nameColor=new Color(200,200,0);
    }
 else     if (adminlevel >= 400) {
      nameColor=Color.yellow;
    }
 else     if (adminlevel > 0) {
      nameColor=new Color(255,255,172);
    }
 else {
      nameColor=Color.white;
    }
  }
  return TextSprite.createTextSprite(entity.getTitle(),nameColor);
}

private Sprite createTitleSprite ( ) { final String titleType = entity . getTitleType ( ) ; final int adminlevel = entity . getAdminLevel ( ) ; Color nameColor = null ; if ( titleType != null ) { if ( titleType . equals ( "npc" ) ) { nameColor = new Color ( 200 , 200 , 255 ) ; } else if ( titleType . equals ( "enemy" ) ) { nameColor = new Color ( 255 , 200 , 200 ) ; } } if ( nameColor == null ) { if ( adminlevel >= 800 ) { nameColor = new Color ( 200 , 200 , 0 ) ; } else if ( adminlevel >= 400 ) { nameColor = Color . yellow ; } else if ( adminlevel > 0 ) { nameColor = new Color ( 255 , 255 , 172 ) ; } else { nameColor = Color . white ; } } return TextSprite . createTextSprite ( entity . getTitle ( ) , nameColor ) ; }
create the title sprite .
