summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-10 20:40:32 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-10 20:40:32 +0000
commit87b0ae26958e5a3105a4e064befe164ec039bc4f (patch)
tree9af06feae97558553f06ab5ffbc98082e7adfaa6
parentb99820246e9ad0b441931d757be5530da61fe524 (diff)
downloadEssentials-87b0ae26958e5a3105a4e064befe164ec039bc4f.tar
Essentials-87b0ae26958e5a3105a4e064befe164ec039bc4f.tar.gz
Essentials-87b0ae26958e5a3105a4e064befe164ec039bc4f.tar.lz
Essentials-87b0ae26958e5a3105a4e064befe164ec039bc4f.tar.xz
Essentials-87b0ae26958e5a3105a4e064befe164ec039bc4f.zip
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
-rw-r--r--Essentials/src/com/earth2me/essentials/Settings.java4
-rw-r--r--Essentials/src/com/earth2me/essentials/User.java8
2 files changed, 9 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Settings.java b/Essentials/src/com/earth2me/essentials/Settings.java
index 9682d5127..e7a9613d5 100644
--- a/Essentials/src/com/earth2me/essentials/Settings.java
+++ b/Essentials/src/com/earth2me/essentials/Settings.java
@@ -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
{
diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java
index a6651770d..54a68f671 100644
--- a/Essentials/src/com/earth2me/essentials/User.java
+++ b/Essentials/src/com/earth2me/essentials/User.java
@@ -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;
}