diff options
author | KHobbits <rob@khobbits.co.uk> | 2013-06-27 09:31:29 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2013-06-27 09:33:35 +0100 |
commit | ec674289a79a7e2062b34eacf37f0c9dcd9fa68c (patch) | |
tree | 795e1f47ca15722775d252bc9a1a6ff0fcd21a0f /EssentialsChat/src/com/earth2me/essentials/chat | |
parent | 8fedd5076cfef2c9af6a1b1651348272f0313994 (diff) | |
download | Essentials-ec674289a79a7e2062b34eacf37f0c9dcd9fa68c.tar Essentials-ec674289a79a7e2062b34eacf37f0c9dcd9fa68c.tar.gz Essentials-ec674289a79a7e2062b34eacf37f0c9dcd9fa68c.tar.lz Essentials-ec674289a79a7e2062b34eacf37f0c9dcd9fa68c.tar.xz Essentials-ec674289a79a7e2062b34eacf37f0c9dcd9fa68c.zip |
Drop messageFormat for simple string replace, remove duped ' marks.
Diffstat (limited to 'EssentialsChat/src/com/earth2me/essentials/chat')
-rw-r--r-- | EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java | 12 |
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); } } } |