From 799158bacd6c55ec7658d76b0f1e7e835833cc58 Mon Sep 17 00:00:00 2001 From: Su-Shing Chen Date: Sat, 8 Jun 2019 16:11:41 +1200 Subject: [PATCH] Put worlds with unknown ping at the bottom of the world hopper list Closes #8176 --- .../client/plugins/worldhopper/WorldSwitcherPanel.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java index df32b03ee4..937a9e74d2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldhopper/WorldSwitcherPanel.java @@ -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: