summaryrefslogtreecommitdiffstats
path: root/EssentialsChat/src/com/earth2me
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-06-27 09:31:29 +0100
committerKHobbits <rob@khobbits.co.uk>2013-06-27 09:33:35 +0100
commit0292cb59cd429c1fd6c55ed976c27877d02e9d1e (patch)
tree2664c371837b5d23ad6457d0f186061a541e0e0c /EssentialsChat/src/com/earth2me
parent3e519f95d5c6b81ee2c18344c1211789019e7647 (diff)
downloadEssentials-0292cb59cd429c1fd6c55ed976c27877d02e9d1e.tar
Essentials-0292cb59cd429c1fd6c55ed976c27877d02e9d1e.tar.gz
Essentials-0292cb59cd429c1fd6c55ed976c27877d02e9d1e.tar.lz
Essentials-0292cb59cd429c1fd6c55ed976c27877d02e9d1e.tar.xz
Essentials-0292cb59cd429c1fd6c55ed976c27877d02e9d1e.zip
Drop messageFormat for simple string replace, remove duped ' marks.
Diffstat (limited to 'EssentialsChat/src/com/earth2me')
-rw-r--r--EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
index a86dcd14f..efd3f5515 100644
--- a/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
+++ b/EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java
@@ -48,13 +48,13 @@ public class EssentialsChatPlayerListenerLowest extends EssentialsChatPlayer
event.setMessage(FormatUtil.formatMessage(user, "essentials.chat", event.getMessage()));
String group = user.getGroup();
String world = user.getWorld().getName();
- MessageFormat format = ess.getSettings().getChatFormat(group);
+ String format = ess.getSettings().getChatFormat(group);
+ format = format.replace("{0}", group);
+ format = format.replace("{1}", world);
+ format = format.replace("{2}", world.substring(0, 1).toUpperCase(Locale.ENGLISH));
synchronized (format)
- {
- event.setFormat(format.format(new Object[]
- {
- group, world, world.substring(0, 1).toUpperCase(Locale.ENGLISH)
- }));
+ {
+ event.setFormat(format);
}
}
}