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:
@@ -660,19 +660,8 @@ public class WorldHopperPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
String cleanName = Text.removeTags(name);
|
String cleanName = Text.removeTags(name);
|
||||||
|
|
||||||
Friend[] friends = client.getFriends();
|
// 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).
|
||||||
if (friends != null)
|
|
||||||
{
|
|
||||||
for (Friend friend : friends)
|
|
||||||
{
|
|
||||||
if (friend != null && friend.getName().equals(cleanName))
|
|
||||||
{
|
|
||||||
return friend;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ClanMember[] clanMembers = client.getClanMembers();
|
ClanMember[] clanMembers = client.getClanMembers();
|
||||||
|
|
||||||
if (clanMembers != null)
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user