mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2024-11-25 19:45:54 +01:00
Tokenize smsg response correctly.
This commit is contained in:
parent
d5d3f02a9d
commit
2c4344289e
@ -82,7 +82,7 @@ public class SMsg implements IRCCommandInterface {
|
||||
String targetMsg = plugin.tokenizer.gameChatTokenizer(player, template, msg);
|
||||
String responseTemplate = plugin.getMsgTemplate("MAIN", "", TemplateName.GAME_PCHAT_RESPONSE);
|
||||
if (!responseTemplate.isEmpty()) {
|
||||
String responseMsg = plugin.tokenizer.msgChatResponseTokenizer(player.getName(), responseTemplate, msg);
|
||||
String responseMsg = plugin.tokenizer.msgChatResponseTokenizer(player, msg, responseTemplate);
|
||||
sender.sendMessage(responseMsg);
|
||||
}
|
||||
plugin.logDebug("Tokenized message: " + targetMsg);
|
||||
|
@ -761,4 +761,10 @@ public class ChatTokenizer {
|
||||
.replace("%MESSAGE%", message)
|
||||
);
|
||||
}
|
||||
|
||||
public String msgChatResponseTokenizer(Player player, String message, String template) {
|
||||
return template
|
||||
.replace("%TARGET%", player.getName())
|
||||
.replace("%MESSAGE%", message);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user