From a131541d8afdb8850f6054a78a3cb294e6894b3f Mon Sep 17 00:00:00 2001 From: l2- Date: Sun, 20 Aug 2017 11:07:03 +0200 Subject: [PATCH 1/2] chat commands: added positions to config items --- .../client/plugins/chatcommands/ChatCommandsConfig.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsConfig.java index 407d9b4e41..1168559dc3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsConfig.java @@ -36,6 +36,7 @@ import net.runelite.client.config.ConfigItem; public interface ChatCommandsConfig { @ConfigItem( + position = 0, keyName = "price", name = "Price Command", description = "Configures whether the Price command is enabled" @@ -46,6 +47,7 @@ public interface ChatCommandsConfig } @ConfigItem( + position = 1, keyName = "lvl", name = "Level Command", description = "Configures whether the Level command is enabled" @@ -56,6 +58,7 @@ public interface ChatCommandsConfig } @ConfigItem( + position = 2, keyName = "enableRecolor", name = "Enable command recolor", description = "Configures whether chat commands are recolored" @@ -66,6 +69,7 @@ public interface ChatCommandsConfig } @ConfigItem( + position = 3, keyName = "hexColorPublic", name = "Public chat", description = "Color of Public chat" @@ -76,6 +80,7 @@ public interface ChatCommandsConfig } @ConfigItem( + position = 4, keyName = "hexColorPublicH", name = "Public chat highlight", description = "Color of Public chat highlight" @@ -86,6 +91,7 @@ public interface ChatCommandsConfig } @ConfigItem( + position = 5, keyName = "hexColorPrivate", name = "Private chat", description = "Color of Private chat" @@ -96,6 +102,7 @@ public interface ChatCommandsConfig } @ConfigItem( + position = 6, keyName = "hexColorPrivateH", name = "Private chat highlight", description = "Color of Private chat highlight" @@ -106,6 +113,7 @@ public interface ChatCommandsConfig } @ConfigItem( + position = 7, keyName = "hexColorCc", name = "Clan chat", description = "Color of Clan chat" @@ -116,6 +124,7 @@ public interface ChatCommandsConfig } @ConfigItem( + position = 8, keyName = "hexColorCcH", name = "Clan chat Highlight", description = "Color of Clan chat highlight" From 8c742a6a5cc8800437fa51028dae788389bb5069 Mon Sep 17 00:00:00 2001 From: l2- Date: Sun, 20 Aug 2017 11:25:22 +0200 Subject: [PATCH 2/2] chat commands: added total command for compatibility with other clients --- .../client/plugins/chatcommands/ChatCommands.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommands.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommands.java index 93480ded3a..8ba2201341 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommands.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommands.java @@ -99,7 +99,13 @@ public class ChatCommands extends Plugin String message = setMessage.getValue(); - if (config.price() && message.toLowerCase().startsWith("!price") && message.length() > 7) + if (config.lvl() && message.toLowerCase().equals("!total")) + { + logger.debug("Running total level lookup"); + ScheduledExecutorService executor = runelite.getExecutor(); + executor.submit(() -> playerSkillLookup(setMessage.getType(), setMessage, "total")); + } + else if (config.price() && message.toLowerCase().startsWith("!price") && message.length() > 7) { String search = message.substring(7);