From bd55c580c982143bf8ef829aa7b52beb9a58760b Mon Sep 17 00:00:00 2001 From: NorbiPeti Date: Wed, 7 Dec 2016 17:53:05 +0100 Subject: [PATCH] Fixed Discord indicator https://github.com/TBMCPlugins/DiscordPlugin/issues/15 --- src/main/java/buttondevteam/chat/ChatProcessing.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/buttondevteam/chat/ChatProcessing.java b/src/main/java/buttondevteam/chat/ChatProcessing.java index 1f43e9c..238d28a 100644 --- a/src/main/java/buttondevteam/chat/ChatProcessing.java +++ b/src/main/java/buttondevteam/chat/ChatProcessing.java @@ -191,12 +191,12 @@ public class ChatProcessing { json.addExtra(new TellrawPart("[C]").setHoverEvent( TellrawEvent.create(TellrawEvent.HoverAC, TellrawEvent.HoverAction.SHOW_TEXT, "Chat only"))); } - json.addExtra(new TellrawPart( - ("[" + (sender instanceof Player ? "" : sender.getClass().getSimpleName().toLowerCase().charAt(0)) - + currentchannel.DisplayName) + "]" + (mp != null && !mp.RPMode ? "[OOC]" : "")) - .setHoverEvent( - TellrawEvent.create(TellrawEvent.HoverAC, TellrawEvent.HoverAction.SHOW_TEXT, - new TellrawPart("Copy message").setColor(Color.Blue))) + json.addExtra( + new TellrawPart(("[" + (sender instanceof IDiscordSender ? "d|" : "") + currentchannel.DisplayName) + + "]" + (mp != null && !mp.RPMode ? "[OOC]" : "")).setHoverEvent( + TellrawEvent.create(TellrawEvent.HoverAC, TellrawEvent.HoverAction.SHOW_TEXT, + new TellrawPart((sender instanceof IDiscordSender ? "From Discord\n" : "") + + "Copy message").setColor(Color.Blue))) .setClickEvent(TellrawEvent.create(TellrawEvent.ClickAC, TellrawEvent.ClickAction.SUGGEST_COMMAND, suggestmsg))); json.addExtra(new TellrawPart(" <"));