From 40ba992e2b971c357e3cc3138c54d9317a241088 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 14 Nov 2017 08:04:47 -0500 Subject: [PATCH] Tweaked multi-message remover. --- .../mineverse/Aust1n46/chat/command/chat/Removemessage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MineverseChat/mineverse/Aust1n46/chat/command/chat/Removemessage.java b/MineverseChat/mineverse/Aust1n46/chat/command/chat/Removemessage.java index 540d492..72ae9dd 100644 --- a/MineverseChat/mineverse/Aust1n46/chat/command/chat/Removemessage.java +++ b/MineverseChat/mineverse/Aust1n46/chat/command/chat/Removemessage.java @@ -182,8 +182,8 @@ public class Removemessage extends MineverseCommand { public WrappedChatComponent getMessageDeletedChatComponentAdmin(ChatMessage message) { String oMessage = message.getOriginalComponent().getJson().substring(1, message.getOriginalComponent().getJson().length() - 11); - if(message.getMessage().contains(Format.FormatStringAll(plugin.getConfig().getString("guiicon")))) { - oMessage = oMessage.substring(0, oMessage.length() - plugin.getConfig().getString("guiicon").length() - 4) + "\"}]"; + if(message.getMessage().contains(ChatColor.stripColor(Format.FormatStringAll(plugin.getConfig().getString("guiicon"))))) { + oMessage = oMessage.substring(0, oMessage.length() - ChatColor.stripColor(Format.FormatStringAll(plugin.getConfig().getString("guiicon"))).length() - 3) + "\"}]"; } return WrappedChatComponent.fromJson(Format.FormatStringAll("{\"text\":\"\",\"extra\":[{\"text\":\"&c&o\",\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"&7Message: \"," + oMessage + "}}}]}")); }