mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 11:49:12 +00:00
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:
parent
b99820246e
commit
87b0ae2695
2 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
{
|
||||
|
|
|
@ -243,9 +243,15 @@ public class User extends UserData implements Comparable<User>, IReplyTo
|
|||
nickname = ess.getSettings().getNicknamePrefix() + nickname;
|
||||
}
|
||||
if (isOp())
|
||||
{
|
||||
try
|
||||
{
|
||||
nickname = ess.getSettings().getOperatorColor().toString() + nickname + "§f";
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
return nickname;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue