mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2025-07-01 20:46:41 +00:00
Fix reactions showing up in Discord bridge & colour codes showing up in bridge
This commit is contained in:
@ -46,8 +46,13 @@ public class ChatManager extends FreedomService
|
||||
private void handleChatEvent(AsyncPlayerChatEvent event)
|
||||
{
|
||||
final Player player = event.getPlayer();
|
||||
String message = event.getMessage().trim();
|
||||
|
||||
String originalMessage = event.getMessage();
|
||||
if (plugin.mu.onPlayerChat(player) || plugin.sh.handlePlayerChat(player, originalMessage))
|
||||
{
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
String message = originalMessage.trim();
|
||||
// Format colors and strip &k
|
||||
message = FUtil.colorize(message);
|
||||
message = message.replaceAll(ChatColor.MAGIC.toString(), "&k");
|
||||
@ -82,6 +87,8 @@ public class ChatManager extends FreedomService
|
||||
return;
|
||||
}
|
||||
|
||||
plugin.dc.onPlayerChat(player, ChatColor.stripColor(message));
|
||||
|
||||
// Check for 4chan trigger
|
||||
if (ConfigEntry.FOURCHAN_ENABLED.getBoolean())
|
||||
{
|
||||
|
Reference in New Issue
Block a user