Don't change color of op if setting is set to none.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1410 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-05-10 20:40:32 +00:00
parent b99820246e
commit 87b0ae2695
2 changed files with 9 additions and 3 deletions

View file

@ -150,14 +150,14 @@ public class Settings implements IConf
return kits.get(name.replace('.', '_').replace('/', '_'));
}
public ChatColor getOperatorColor()
public ChatColor getOperatorColor() throws Exception
{
String colorName = config.getString("ops-name-color", null);
if (colorName == null)
return ChatColor.RED;
if("none".equalsIgnoreCase(colorName) || colorName.isEmpty())
return ChatColor.WHITE;
throw new Exception();
try
{

View file

@ -244,7 +244,13 @@ public class User extends UserData implements Comparable<User>, IReplyTo
}
if (isOp())
{
nickname = ess.getSettings().getOperatorColor().toString() + nickname + "§f";
try
{
nickname = ess.getSettings().getOperatorColor().toString() + nickname + "§f";
}
catch(Exception e)
{
}
}
return nickname;
}