static String createStatsType ( Set < String > statsItems , String sortType , MtasFunctionParserFunction functionParser ) { String statsType = STATS_BASIC ; for ( String statsItem : statsItems ) { if ( STATS_FULL_TYPES . contains ( statsItem ) ) { statsType = STATS_FULL ; break ; } else if ( STATS_ADVANCED_TYPES . contains ( statsItem ) ) { statsType = STATS_ADVANCED ; } else if ( statsType != STATS_ADVANCED && STATS_BASIC_TYPES . contains ( statsItem ) ) { statsType = STATS_BASIC ; } else { Matcher m = fpStatsFunctionItems . matcher ( statsItem . trim ( ) ) ; if ( m . find ( ) ) { if ( STATS_FUNCTIONS . contains ( m . group ( 2 ) . trim ( ) ) ) { statsType = STATS_FULL ; break ; } } } } if ( sortType != null && STATS_TYPES . contains ( sortType ) ) { if ( STATS_FULL_TYPES . contains ( sortType ) ) { statsType = STATS_FULL ; } else if ( STATS_ADVANCED_TYPES . contains ( sortType ) ) { statsType = ( statsType == null || statsType != STATS_FULL ) ? STATS_ADVANCED : statsType ; } } return statsType ; }
Creates the stats type .