Fix online friends list

Previously, it was incorrectly asserting that all players were
incognito. If we want to exclude incognito players, we'll have to find a
different way.
This commit is contained in:
cnr 2016-04-13 17:24:46 -05:00
parent 91c97e38b8
commit 6d01e235fd

View File

@ -274,16 +274,14 @@ public class FriendsGUI implements Listener
FriendStatus friend = friends.get(friendSlot);
boolean incognito = friend.Online;
ItemBuilder builder = new ItemBuilder(Material.SKULL_ITEM, 1, (short) (friend.Online && !incognito ? 3 : 0));
ItemBuilder builder = new ItemBuilder(Material.SKULL_ITEM, 1, (short) (friend.Online ? 3 : 0));
builder.setTitle(C.cWhite + C.Bold + friend.Name);
builder.setPlayerHead(friend.Name);
builder.addLore(C.cGray + C.Bold + "Status: " + (friend.Online && !incognito ? C.cDGreen + "Online" : C.cRed + "Offline"));
builder.addLore(C.cGray + C.Bold + "Status: " + (friend.Online ? C.cDGreen + "Online" : C.cRed + "Offline"));
if (friend.Online && !incognito)
if (friend.Online)
{
builder.addLore(C.cGray + C.Bold + "Server: " + C.cYellow + friend.ServerName);
}
@ -292,7 +290,7 @@ public class FriendsGUI implements Listener
builder.addLore(C.cGray + "Last seen " + UtilTime.MakeStr(friend.LastSeenOnline) + " ago");
}
if (friend.Online && !incognito)
if (friend.Online)
{
builder.addLore("");
builder.addLore(C.cGray + "Left click to teleport to their server");