• Type: Bug
    • Resolution: Invalid
    • Priority: Minor
    • None
    • Affects Version/s: None
    • Environment:

      Windows 7, Java 8

    • 1.13 (Latest)
    • Yes

      As in the title, there was a problem setting up the group and the problem is that when I set the name color and reload the server (I stopped it), my name is still white, why? I believe and see that the max. character in 1.13 is 64 in Spigot and I use it too. The basics (like configuration creating, plugin.yml correctness) do not have to be all right.
      Here are the pictures and codes:

      In config:

      In code:

      	private void setTeam(Player player, String prefix, String suffix) {
      		Scoreboard tboard = config.getBoolean("change-prefix-suffix-in-tablist.use-external-scoreboard") ? player.getScoreboard() : Bukkit.getScoreboardManager().getNewScoreboard();
      		String version = Bukkit.getServer().getClass().getPackage().getName().replace(".", ",").split(",")[3];
      		for (String num : groups.getConfigurationSection("groups").getKeys(false)) {
      			Team team = getTeam(num, tboard);
      			if (version.equals("v1_8_R3")) {
      				if (prefix.length() > 15) prefix = prefix.substring(0, 16);
      				if (suffix.length() > 15) suffix = suffix.substring(0, 16);
      			} else if (version.equals("v1_9_R2")) {
      				if (prefix.length() > 15) prefix = prefix.substring(0, 16);
      				if (suffix.length() > 15) suffix = suffix.substring(0, 16);
      			} else if (version.equals("v1_10_R1")) {
      				if (prefix.length() > 15) prefix = prefix.substring(0, 16);
      				if (suffix.length() > 15) suffix = suffix.substring(0, 16);
      			} else if (version.equals("v1_11_R1")) {
      				if (prefix.length() > 15) prefix = prefix.substring(0, 16);
      				if (suffix.length() > 15) suffix = suffix.substring(0, 16);
      			} else if (version.equals("v1_12_R1")) {
      				if (prefix.length() > 15) prefix = prefix.substring(0, 16);
      				if (suffix.length() > 15) suffix = suffix.substring(0, 16);
      			} else if (version.equals("v1_13_R1")) {
      				if (prefix.length() > 63) prefix = prefix.substring(0, 64);
      				if (suffix.length() > 63) suffix = suffix.substring(0, 64);
      			}
      			team.addPlayer(player);
      			team.setPrefix(prefix);
      			team.setSuffix(suffix);
      		}
      		player.setScoreboard(tboard);
      	}
      
      	private int getSortNum(String group) {
      		List<String> listGroups = groups.getStringList("group-sort-number-list");
      		for (int i = 0; i < listGroups.size(); i++) {
      			if (listGroups.get(i).equalsIgnoreCase(group)) {
      				return i;
      			}
      		}
      		return 99;
      	}
      
      	private Team getTeam(String num, Scoreboard tboard) {
      		int sortID = getSortNum(num);
      		String groupNameSort = "0" + (sortID < 10 ? ("0" + sortID) : sortID) + num;
      		Team team = tboard.getTeam(groupNameSort) == null ? tboard.registerNewTeam(groupNameSort) : tboard.getTeam(groupNameSort);
      		return team;
      	}
      

      In Spigot code:

            Assignee:
            Unassigned
            Reporter:
            montlikadani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: