src/main/java/io/github/nosequel/scoreboard/ScoreboardAdapter.java
public void handleElement(Player player, ScoreboardElement element) {
        if (!this.identifiers.containsKey(player)) {
            this.identifiers.put(player, new ArrayList<>());
        }

        final List<String> lines = element.getLines();
        final List<String> identifiers = this.identifiers.get(player);

        final Scoreboard board = this.getScoreboard(player);
        final Objective objective = this.getObjective(board);


        for (int index = 0; index < 16; index++) {
            final String identifier = ChatColor.values()[index].toString() + ChatColor.WHITE;

            if (lines.size() - 1 < index) {
                if (objective.getScore(identifier) == null) {
                    break;
                }

                this.removeEntry(board, identifier);
            } else {
                final String line = lines.get(index);

                final Team team = this.getTeam(board, identifier);
                final String[] splitText = this.splitText(line);

                team.setPrefix(splitText[0]);
                team.setSuffix(splitText[1]);

                identifiers.add(identifier);
                objective.getScore(identifier).setScore(-index);
            }
        }

        objective.setDisplayName(element.getTitle());
        player.setScoreboard(board);
    }
/**
     * Handle an element to send to a player
     *
     * @param player  the player to send it to
     * @param element the element to send
     */
Handle an element to send to a player
@param player  the player to send it to
@param element the element to send
Handle an element to send to a player @param player the player to send it to @param element the element to send
public void handleElement(Player player, ScoreboardElement element) {
        if (!this.identifiers.containsKey(player)) {
            this.identifiers.put(player, new ArrayList<>());
        }
        final List<String> lines = element.getLines();
        final List<String> identifiers = this.identifiers.get(player);
        final Scoreboard board = this.getScoreboard(player);
        final Objective objective = this.getObjective(board);
        for (int index = 0; index < 16; index++) {
            final String identifier = ChatColor.values()[index].toString() + ChatColor.WHITE;
            if (lines.size() - 1 < index) {
                if (objective.getScore(identifier) == null) {
                    break;
                }
                this.removeEntry(board, identifier);
            } else {
                final String line = lines.get(index);
                final Team team = this.getTeam(board, identifier);
                final String[] splitText = this.splitText(line);
                team.setPrefix(splitText[0]);
                team.setSuffix(splitText[1]);
                identifiers.add(identifier);
                objective.getScore(identifier).setScore(-index);
            }
        }
        objective.setDisplayName(element.getTitle());
        player.setScoreboard(board);
    }
public void handleElement ( Player player , ScoreboardElement element ) { if ( ! this . identifiers . containsKey ( player ) ) { this . identifiers . put ( player , new ArrayList < > ( ) ) ; } final List < String > lines = element . getLines ( ) ; final List < String > identifiers = this . identifiers . get ( player ) ; final Scoreboard board = this . getScoreboard ( player ) ; final Objective objective = this . getObjective ( board ) ; for ( int index = 0 ; index < 16 ; index ++ ) { final String identifier = ChatColor . values ( ) [ index ] . toString ( ) + ChatColor . WHITE ; if ( lines . size ( ) - 1 < index ) { if ( objective . getScore ( identifier ) == null ) { break ; } this . removeEntry ( board , identifier ) ; } else { final String line = lines . get ( index ) ; final Team team = this . getTeam ( board , identifier ) ; final String [ ] splitText = this . splitText ( line ) ; team . setPrefix ( splitText [ 0 ] ) ; team . setSuffix ( splitText [ 1 ] ) ; identifiers . add ( identifier ) ; objective . getScore ( identifier ) . setScore ( - index ) ; } } objective . setDisplayName ( element . getTitle ( ) ) ; player . setScoreboard ( board ) ; }
Handle an element to send to a player
 @param player  the player to send it to
 @param element the element to send
Handle an element to send to a player @param player the player to send it to @param element the element to send