diff --git a/src/main/java/com/lenis0012/bukkit/marriage/listeners/HerochatListener.java b/src/main/java/com/lenis0012/bukkit/marriage/listeners/HerochatListener.java index 5a42277..b650adc 100644 --- a/src/main/java/com/lenis0012/bukkit/marriage/listeners/HerochatListener.java +++ b/src/main/java/com/lenis0012/bukkit/marriage/listeners/HerochatListener.java @@ -5,6 +5,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import com.dthielke.herochat.ChannelChatEvent; +import com.dthielke.herochat.Chatter.Result; import com.lenis0012.bukkit.marriage.MPlayer; import com.lenis0012.bukkit.marriage.Marriage; @@ -19,7 +20,9 @@ public class HerochatListener implements Listener { public void onChannelChat(ChannelChatEvent event) { Player player = event.getSender().getPlayer(); MPlayer mp = plugin.getMPlayer(player); - if(mp.isMarried()) { + if(mp.isChatting()) { + event.setResult(Result.INVALID); //Hide partner chat + } if(mp.isMarried()) { if(plugin.getConfig().getBoolean("settings.chat-prefix.use")) { String format = plugin.getConfig().getString("settings.chat-prefix.format"); format = plugin.fixColors(format); diff --git a/src/main/java/com/lenis0012/bukkit/marriage/listeners/PlayerListener.java b/src/main/java/com/lenis0012/bukkit/marriage/listeners/PlayerListener.java index 48940c5..649e4e2 100644 --- a/src/main/java/com/lenis0012/bukkit/marriage/listeners/PlayerListener.java +++ b/src/main/java/com/lenis0012/bukkit/marriage/listeners/PlayerListener.java @@ -65,10 +65,8 @@ public class PlayerListener implements Listener { } event.setCancelled(true); - //HeroChat fix? - event.getRecipients().clear(); } else if(mp.isMarried()) { - //Replace chat with cusotm prefix + //Replace chat with custom prefix if(plugin.getConfig().getBoolean("settings.chat-prefix.use")) { String format = plugin.getConfig().getString("settings.chat-prefix.format"); format = plugin.fixColors(format);