From 58d2b2e0e17c156d50b3b6b154fbbc63dd60c24e Mon Sep 17 00:00:00 2001 From: Adam Keenan Date: Sun, 30 Jan 2022 19:57:35 -0500 Subject: [PATCH] chat commands: fix cmb to use correct endpoint --- .../plugins/chatcommands/ChatCommandsPlugin.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java index f1e72c9303..84b87bcb88 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java @@ -1407,21 +1407,11 @@ public class ChatCommandsPlugin extends Plugin return; } - ChatMessageType type = chatMessage.getType(); - - String player; - if (type == ChatMessageType.PRIVATECHATOUT) - { - player = client.getLocalPlayer().getName(); - } - else - { - player = Text.sanitize(chatMessage.getName()); - } + final HiscoreLookup lookup = getCorrectLookupFor(chatMessage); try { - HiscoreResult playerStats = hiscoreClient.lookup(player); + HiscoreResult playerStats = hiscoreClient.lookup(lookup.getName(), lookup.getEndpoint()); if (playerStats == null) {