Open
Description
Improve Readability
i fix a shit code in CheckTaoYi Command
public boolean checkDistance(TeamExecutor.Team team, int max, BiConsumer<TeamExecutor.Team,Boolean> success){
if (team == TeamExecutor.Team.NONE){
return false;
} else {
TeamExecutor.Team enemyTeam = teamExecutor.getEnemyTeam(team);
int distance = (int) teamExecutor.getPlayer(enemyTeam)
.getLocation()
.distance(teamExecutor.getStartGameLocation().get(enemyTeam));
success.accept(enemyTeam,Math.abs(distance) > max);
}
return true;
}
the contributer use functional interface BiConsumer<TeamExecutor.Team,Boolean>
is bad
YouM is shit coder
i fixed it to improve readability
Configuration
i add config, user can use config.yml to update escaped max distance
please accept my pull requests