Skip to content

CheckTaoYi improve readability, add config.yml to adjust "escaped max distance" #3

Open
@YOM667

Description

@YOM667

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

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions