Merge pull request #5725 from oharace/issue5679_fix_quick_hop_bug_in_clan_chat

Allow hop-to option in clan chat menu when target player is a friend and their private chat is off
This commit is contained in:
Tomas Slusny
2018-10-19 08:53:13 +02:00
committed by GitHub

View File

@@ -660,19 +660,8 @@ public class WorldHopperPlugin extends Plugin
{
String cleanName = Text.removeTags(name);
Friend[] friends = client.getFriends();
if (friends != null)
{
for (Friend friend : friends)
{
if (friend != null && friend.getName().equals(cleanName))
{
return friend;
}
}
}
// Search clan members first, because if a friend is in the clan chat but their private
// chat is 'off', then the hop-to option will not get shown in the menu (issue #5679).
ClanMember[] clanMembers = client.getClanMembers();
if (clanMembers != null)
@@ -686,6 +675,19 @@ public class WorldHopperPlugin extends Plugin
}
}
Friend[] friends = client.getFriends();
if (friends != null)
{
for (Friend friend : friends)
{
if (friend != null && friend.getName().equals(cleanName))
{
return friend;
}
}
}
return null;
}
}