From 0292cb59cd429c1fd6c55ed976c27877d02e9d1e Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 27 Jun 2013 09:31:29 +0100 Subject: Drop messageFormat for simple string replace, remove duped ' marks. --- .../essentials/chat/EssentialsChatPlayerListenerLowest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'EssentialsChat/src') 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); } } } -- cgit v1.2.3