mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 18:14:38 +02: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:
@@ -150,14 +150,14 @@ public class Settings implements IConf
|
|||||||
return kits.get(name.replace('.', '_').replace('/', '_'));
|
return kits.get(name.replace('.', '_').replace('/', '_'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ChatColor getOperatorColor()
|
public ChatColor getOperatorColor() throws Exception
|
||||||
{
|
{
|
||||||
String colorName = config.getString("ops-name-color", null);
|
String colorName = config.getString("ops-name-color", null);
|
||||||
|
|
||||||
if (colorName == null)
|
if (colorName == null)
|
||||||
return ChatColor.RED;
|
return ChatColor.RED;
|
||||||
if("none".equalsIgnoreCase(colorName) || colorName.isEmpty())
|
if("none".equalsIgnoreCase(colorName) || colorName.isEmpty())
|
||||||
return ChatColor.WHITE;
|
throw new Exception();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@@ -243,9 +243,15 @@ public class User extends UserData implements Comparable<User>, IReplyTo
|
|||||||
nickname = ess.getSettings().getNicknamePrefix() + nickname;
|
nickname = ess.getSettings().getNicknamePrefix() + nickname;
|
||||||
}
|
}
|
||||||
if (isOp())
|
if (isOp())
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
nickname = ess.getSettings().getOperatorColor().toString() + nickname + "§f";
|
nickname = ess.getSettings().getOperatorColor().toString() + nickname + "§f";
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
return nickname;
|
return nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user