From fd262a76a4bbd1bebd9e7dcbd56379f8ce6cfb3a Mon Sep 17 00:00:00 2001 From: LOOHP Date: Fri, 17 Apr 2020 22:20:03 +0800 Subject: [PATCH] Update SenderFinder.java --- src/com/loohp/interactivechat/Modules/SenderFinder.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/loohp/interactivechat/Modules/SenderFinder.java b/src/com/loohp/interactivechat/Modules/SenderFinder.java index d2fa17f3..4ff38818 100644 --- a/src/com/loohp/interactivechat/Modules/SenderFinder.java +++ b/src/com/loohp/interactivechat/Modules/SenderFinder.java @@ -66,8 +66,11 @@ public static Optional getSender(BaseComponent basecomponent, String mes Player currentplayer = null; int currentpos = 99999; for (Entry entry : names.entrySet()) { + Bukkit.getConsoleSender().sendMessage(entry.getKey()); int pos = chat.toLowerCase().indexOf(entry.getKey().toLowerCase()); - if (pos > 0 && pos < currentpos) { + Bukkit.getConsoleSender().sendMessage(chat); + Bukkit.getConsoleSender().sendMessage(pos + ""); + if (pos >= 0 && pos < currentpos) { currentpos = pos; currentplayer = entry.getValue(); }