mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-12-03 07:33:38 +01:00
Respect hidden players in f show. Resolves #1049
This commit is contained in:
parent
d6b147ef7b
commit
fe51837845
@ -200,6 +200,9 @@ public class TagUtil {
|
||||
FancyMessage currentOnline = P.p.txt.parseFancy(prefix);
|
||||
boolean firstOnline = true;
|
||||
for (FPlayer p : MiscUtil.rankOrder(target.getFPlayersWhereOnline(true))) {
|
||||
if (fme.getPlayer() != null && !fme.getPlayer().canSee(p.getPlayer())) {
|
||||
continue; // skip
|
||||
}
|
||||
String name = p.getNameAndTitle();
|
||||
currentOnline.then(firstOnline ? name : ", " + name);
|
||||
currentOnline.tooltip(tipPlayer(p)).color(fme.getColorTo(p));
|
||||
@ -216,7 +219,8 @@ public class TagUtil {
|
||||
boolean firstOffline = true;
|
||||
for (FPlayer p : MiscUtil.rankOrder(target.getFPlayers())) {
|
||||
String name = p.getNameAndTitle();
|
||||
if (!p.isOnline()) {
|
||||
// Also make sure to add players that are online BUT can't be seen.
|
||||
if (!p.isOnline() || (fme.getPlayer() != null && p.isOnline() && !fme.getPlayer().canSee(p.getPlayer()))) {
|
||||
currentOffline.then(firstOffline ? name : ", " + name);
|
||||
currentOffline.tooltip(tipPlayer(p)).color(fme.getColorTo(p));
|
||||
firstOffline = false;
|
||||
|
Loading…
Reference in New Issue
Block a user