I was wondering if theres any way to fix, when player has a long name (16 chars) the name will be all white in the Tab list. Im using cTabList for the colors but i was thinking if there is an easy fix for this. I already commented on cTablist about this but still, Wondering if theres easier fix for this Thanks Pandy
I don't think that there can be a fix for this, because, as far as I know, the minecraft client allows a maximum of 16 chars per cell in the tablist. Because a color code has to chars, the name would be 18 chars long, which wouldn't work. That can't be fixed by the devs of cTablist. If you're using an API, you could use the this: Code:java String name = "whatever";ChatColor color = ChatColor.BLUE; //Whateverif (name.length() >= 15) {int toMany = (color.toString() + name).length() - 16;name = name.subString(0, name.length()-toMany);name = color + name;}WhatEverYouAPIIs.setCell(x, y, name); //Might be slightly different If you want to print the name "thisnameisxxlong" (length: 16) in red, the code would place "thisnameisxxlo" (length: looks like 14, but it's 16).
You can add a prefix using scoreboards and teams, that's how some servers have [D] thisnameisxxlong But instead of [D] you can simply add ChatColor.RED
Pandastyl simolus3 hacky way around it would be using the team prefix (this would result into a coloured nametag as well)