Space in front of disguised player's names when rank = all

Fixes a small problem where there would be a space in front of a user's
name if they were disguised as a player with a rank of ALL.
This commit is contained in:
Sam 2016-06-06 21:06:40 +01:00
parent 298c09ab82
commit 3bcfe22835

View File

@ -285,7 +285,7 @@ public class DisguiseCommand extends CommandBase<HubManager> implements Listener
ChatColor team = ChatColor.WHITE; ChatColor team = ChatColor.WHITE;
Player player = Bukkit.getPlayer(profileToAdd.getName()); Player player = Bukkit.getPlayer(profileToAdd.getName());
EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle(); EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
String tag = Plugin.GetClients().Get(player).GetRank().getTag(true, true) + " "; String tag = Plugin.GetClients().Get(player).GetRank() == Rank.ALL ? "" : Plugin.GetClients().Get(player).GetRank().getTag(true, true) + " ";
if(Plugin.GetClients().Get(player).isDisguised()) if(Plugin.GetClients().Get(player).isDisguised())
{ {
tag = Plugin.GetClients().Get(player).getDisguisedRank().getTag(true, true) + " "; tag = Plugin.GetClients().Get(player).getDisguisedRank().getTag(true, true) + " ";