From bf0382ca769bd1029f83cfde4961fea88b80b656 Mon Sep 17 00:00:00 2001 From: drtshock Date: Thu, 6 Aug 2015 16:35:49 -0500 Subject: [PATCH] Add newline and {null} support for player messages. --- .../factions/zcore/persist/MemoryFPlayer.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java index 2fb16471..3742c61e 100644 --- a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java +++ b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFPlayer.java @@ -854,6 +854,15 @@ public abstract class MemoryFPlayer implements FPlayer { // -------------------------------------------- // 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(); if (player == null) { return;