Put worlds with unknown ping at the bottom of the world hopper list
Closes #8176
This commit is contained in:
@@ -161,7 +161,12 @@ class WorldSwitcherPanel extends PluginPanel
|
||||
switch (orderIndex)
|
||||
{
|
||||
case PING:
|
||||
return getCompareValue(r1, r2, WorldTableRow::getPing);
|
||||
// Leave worlds with unknown ping at the bottom
|
||||
return getCompareValue(r1, r2, row ->
|
||||
{
|
||||
int ping = row.getPing();
|
||||
return ping > 0 ? ping : null;
|
||||
});
|
||||
case WORLD:
|
||||
return getCompareValue(r1, r2, row -> row.getWorld().getId());
|
||||
case PLAYERS:
|
||||
|
||||
Reference in New Issue
Block a user