Add newline and {null} support for player messages.
This commit is contained in:
parent
76e6fd2765
commit
bf0382ca76
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user