Every time I talk, no matter what rank. The name shows up weird when I yell. Like this:
[Donator] USername: Test
[Admin] ADmin: Test
[Mod] HOmo: Test
[Owner] NIk: Test
As you can see the 2nd letter of every name is capital. I have tried switching playername with propername. It doesn't change anything.. If anyone could help be that would be great and I will highly appreciate it. Thanks!
My yell command:
Code:
if (playerCommand.startsWith("yell")) {
for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
if(c.playerRights == 0){
c.sendMessage("This is a donator only feature.");
return;
}
switch (c.playerRights){
case 0:
/*c2.sendMessage("<col=255>[Yell]</col>"+Misc.optimizeText(c.playerName)+": "
+ Misc.optimizeText(playerCommand.substring(5))+"");*/
break;
case 1:
c2.sendMessage("[<col=35584>Donator</col>]"+ c.properName +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
break;
case 2:
c2.sendMessage("[<col=00008B>MOD</col>]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
break;
case 3:
c2.sendMessage("[<col=16765952>ADMIN</col>]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
break;
case 4:
c2.sendMessage("[<col=13107200>HEAD ADMIN</col>]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
break;
case 5:
c2.sendMessage("[OWNER]"+ Misc.optimizeText(c.playerName) +": "
+ Misc.optimizeText(playerCommand.substring(5)) +"");
break;
}
}
}
}