Chat Commands: Add hints to config description (#5747)

Adds usage hints to the config description for each of the chat commands.

Closes #4298
This commit is contained in:
trimbe
2018-10-02 04:17:03 -04:00
committed by Tomas Slusny
parent 6db26f7d38
commit 7d86ae4873
2 changed files with 10 additions and 10 deletions

View File

@@ -35,7 +35,7 @@ public interface ChatCommandsConfig extends Config
position = 0, position = 0,
keyName = "price", keyName = "price",
name = "Price Command", name = "Price Command",
description = "Configures whether the Price command is enabled" description = "Configures whether the Price command is enabled<br> !price [item]"
) )
default boolean price() default boolean price()
{ {
@@ -46,7 +46,7 @@ public interface ChatCommandsConfig extends Config
position = 1, position = 1,
keyName = "lvl", keyName = "lvl",
name = "Level Command", name = "Level Command",
description = "Configures whether the Level command is enabled" description = "Configures whether the Level command is enabled<br> !lvl [skill]"
) )
default boolean lvl() default boolean lvl()
{ {
@@ -57,7 +57,7 @@ public interface ChatCommandsConfig extends Config
position = 2, position = 2,
keyName = "clue", keyName = "clue",
name = "Clue Command", name = "Clue Command",
description = "Configures whether the Clue command is enabled" description = "Configures whether the Clue command is enabled<br> !clues"
) )
default boolean clue() default boolean clue()
{ {
@@ -68,7 +68,7 @@ public interface ChatCommandsConfig extends Config
position = 3, position = 3,
keyName = "killcount", keyName = "killcount",
name = "Killcount Command", name = "Killcount Command",
description = "Configures whether the Killcount command is enabled" description = "Configures whether the Killcount command is enabled<br> !kc [boss]"
) )
default boolean killcount() default boolean killcount()
{ {

View File

@@ -82,10 +82,10 @@ import net.runelite.http.api.kc.KillCountClient;
public class ChatCommandsPlugin extends Plugin implements ChatboxInputListener public class ChatCommandsPlugin extends Plugin implements ChatboxInputListener
{ {
private static final float HIGH_ALCHEMY_CONSTANT = 0.6f; private static final float HIGH_ALCHEMY_CONSTANT = 0.6f;
private static final Pattern KILLCOUNT_PATERN = Pattern.compile("Your (.+) kill count is: <col=ff0000>(\\d+)</col>."); private static final Pattern KILLCOUNT_PATTERN = Pattern.compile("Your (.+) kill count is: <col=ff0000>(\\d+)</col>.");
private static final Pattern RAIDS_PATTERN = Pattern.compile("Your completed (.+) count is: <col=ff0000>(\\d+)</col>."); private static final Pattern RAIDS_PATTERN = Pattern.compile("Your completed (.+) count is: <col=ff0000>(\\d+)</col>.");
private static final Pattern WINTERTODT_PATERN = Pattern.compile("Your subdued Wintertodt count is: <col=ff0000>(\\d+)</col>."); private static final Pattern WINTERTODT_PATTERN = Pattern.compile("Your subdued Wintertodt count is: <col=ff0000>(\\d+)</col>.");
private static final Pattern BARROWS_PATERN = Pattern.compile("Your Barrows chest count is: <col=ff0000>(\\d+)</col>."); private static final Pattern BARROWS_PATTERN = Pattern.compile("Your Barrows chest count is: <col=ff0000>(\\d+)</col>.");
private static final String TOTAL_LEVEL_COMMAND_STRING = "!total"; private static final String TOTAL_LEVEL_COMMAND_STRING = "!total";
private static final String PRICE_COMMAND_STRING = "!price"; private static final String PRICE_COMMAND_STRING = "!price";
private static final String LEVEL_COMMAND_STRING = "!lvl"; private static final String LEVEL_COMMAND_STRING = "!lvl";
@@ -244,7 +244,7 @@ public class ChatCommandsPlugin extends Plugin implements ChatboxInputListener
} }
String message = chatMessage.getMessage(); String message = chatMessage.getMessage();
Matcher matcher = KILLCOUNT_PATERN.matcher(message); Matcher matcher = KILLCOUNT_PATTERN.matcher(message);
if (matcher.find()) if (matcher.find())
{ {
String boss = matcher.group(1); String boss = matcher.group(1);
@@ -253,7 +253,7 @@ public class ChatCommandsPlugin extends Plugin implements ChatboxInputListener
setKc(boss, kc); setKc(boss, kc);
} }
matcher = WINTERTODT_PATERN.matcher(message); matcher = WINTERTODT_PATTERN.matcher(message);
if (matcher.find()) if (matcher.find())
{ {
int kc = Integer.parseInt(matcher.group(1)); int kc = Integer.parseInt(matcher.group(1));
@@ -270,7 +270,7 @@ public class ChatCommandsPlugin extends Plugin implements ChatboxInputListener
setKc(boss, kc); setKc(boss, kc);
} }
matcher = BARROWS_PATERN.matcher(message); matcher = BARROWS_PATTERN.matcher(message);
if (matcher.find()) if (matcher.find())
{ {
int kc = Integer.parseInt(matcher.group(1)); int kc = Integer.parseInt(matcher.group(1));