1.12.2 addEntry method doesn't work (Scoreboard)

Discussion in 'Spigot Plugin Development' started by gastuxa1ne, Jun 21, 2021.

  1. Hi, I have this method for the scoreboard, but it is on 32 characters, I wish to do on 48. I know about addEntry, but I tried adding it in different ways, but nothing works, I hope someone will help me.p. s sorry for my english
    Code (Java):
        private void updateLine(final Line boardLine, String value) {

            value = ChatColor.translateAlternateColorCodes('&', value);

            if (value.length() <= 16) {

                boardLine.getTeam().setPrefix(value);
                return;
            }

            final String prefix = value.substring(0, 16);
            String suffix = value.substring(16);

            final String lastColor = ChatColor.getLastColors(prefix);
            if (!boardLine.getFixColor().equals(lastColor)) {
                removeLine(boardLine);
                boardLine.fixColor(lastColor);
            }

            if (suffix.length() > 16) {
                suffix = suffix.substring(0, 16);
            }

            boardLine.getTeam().setPrefix(prefix);
            boardLine.getTeam().setSuffix(suffix);
        }