Skip to content

Commit

Permalink
Update SenderFinder.java
Browse files Browse the repository at this point in the history
  • Loading branch information
LOOHP committed Apr 17, 2020
1 parent b43f5e8 commit fd262a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/com/loohp/interactivechat/Modules/SenderFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ public static Optional<Player> getSender(BaseComponent basecomponent, String mes
Player currentplayer = null;
int currentpos = 99999;
for (Entry<String, Player> 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();
}
Expand Down

0 comments on commit fd262a7

Please sign in to comment.