1
0
mirror of https://github.com/mcMMO-Dev/mcMMO.git synced 2026-02-18 01:42:32 +01:00

Redoing vMinecraftChat.getName()

This commit is contained in:
cerevisiae
2010-12-09 20:09:42 -06:00
parent 370e8d2b36
commit 56c0805fca
3 changed files with 47 additions and 8 deletions

View File

@@ -212,18 +212,24 @@ public class vMinecraftChat {
//=====================================================================
public static String getName(Player player){
//Get the prefix
String playerPrefix = player.getPrefix();
//Add the nickname or the name if there is none
String output = vMinecraftUsers.getProfile(player).getNick();
//Add the name
String output = player.getName();
if(output.isEmpty())
output = player.getName();
//Add the color if there is one
if(player.getColor() != null && player.getColor() != "")
output = player.getColor().substring(0,2) + output;
//Add the tag if there is one
if(playerPrefix != null && !playerPrefix.isEmpty())
output = applyColors(playerPrefix.substring(1)) + output;
output = vMinecraftUsers.getProfile(player).getTag() + output;
//Add the suffix if there is one
output += vMinecraftUsers.getProfile(player).getSuffix();
/*if(playerPrefix != null && !playerPrefix.isEmpty())
output = applyColors(playerPrefix.substring(1)) + output;*/
//Return the name
return output;
@@ -565,4 +571,4 @@ public class vMinecraftChat {
}
return message;
}
}
}