Upto date

This commit is contained in:
ElgarL committed 2011-10-21 02:23:24 +00:00
1 parent 0e26cfd80f
commit 1980cfe14b
2 files changed
+4 -4

No files matched your search

@@ -179,7 +179,7 @@ public class TownyChatFormatter {
public static String getChatFormat(TownyChatEvent event) {
// Replace the {msg} here so it's not regex parsed.
return replacer.replaceAll(event.getFormat(), event).replace("{msg}", event.getMessage());
return replacer.replaceAll(event.getFormat(), event).replace("{msg}", "%2$s");
}
/**
@@ -116,7 +116,7 @@ public class TownyPlayerHighestListener extends PlayerListener {
TownyChatEvent chatEvent = new TownyChatEvent(event, resident);
event.setFormat(TownyChatFormatter.getChatFormat(chatEvent));
TownyMessaging.sendTownMessage(town, chatEvent.getFormat());
TownyMessaging.sendTownMessage(town, chatEvent.getFormat().replace("%2$s", event.getMessage()));
} catch (NotRegisteredException x) {
TownyMessaging.sendErrorMsg(player, x.getError());
}
@@ -131,7 +131,7 @@ public class TownyPlayerHighestListener extends PlayerListener {
TownyChatEvent chatEvent = new TownyChatEvent(event, resident);
event.setFormat(TownyChatFormatter.getChatFormat(chatEvent));
TownyMessaging.sendNationMessage(nation, chatEvent.getFormat());
TownyMessaging.sendNationMessage(nation, chatEvent.getFormat().replace("%2$s", event.getMessage()));
} catch (NotRegisteredException x) {
TownyMessaging.sendErrorMsg(player, x.getError());
}
@@ -148,7 +148,7 @@ public class TownyPlayerHighestListener extends PlayerListener {
for (Player test : plugin.getTownyUniverse().getOnlinePlayers()) {
if (!plugin.isPermissions() || (plugin.isPermissions() && TownyUniverse.getPermissionSource().hasPermission(test, TownySettings.getChatChannelPermission(command))))
TownyMessaging.sendMessage(test, chatEvent.getFormat());
TownyMessaging.sendMessage(test, chatEvent.getFormat().replace("%2$s", event.getMessage()));
}
// TownyMessaging.sendNationMessage(nation, chatEvent.getFormat());