1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-06 06:37:28 +02:00

Drop messageFormat for simple string replace, remove duped ' marks.

This commit is contained in:
KHobbits
2013-06-27 09:31:29 +01:00
parent 3e771e75c2
commit ee5cc43061
3 changed files with 18 additions and 21 deletions

View File

@@ -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);
}
}
}