Show hop-to option in clan chat menu when target player is a friend and their private chat is off

This commit is contained in:
Christopher O'Hara
2018-09-30 18:11:37 -05:00
parent df3a33f12a
commit 101d471c7c

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;
}
}