Add newline and {null} support for player messages.

This commit is contained in:
drtshock 2015-08-06 16:35:49 -05:00
parent 76e6fd2765
commit bf0382ca76

View File

@ -854,6 +854,15 @@ public abstract class MemoryFPlayer implements FPlayer {
// -------------------------------------------- // // -------------------------------------------- //
public void sendMessage(String msg) { public void sendMessage(String msg) {
if (msg.contains("{null}")) {
return; // user wants this message to not send
}
if (msg.contains("/n/")) {
for (String s : msg.split("/n/")) {
sendMessage(s);
}
return;
}
Player player = this.getPlayer(); Player player = this.getPlayer();
if (player == null) { if (player == null) {
return; return;