diff --git a/README.md b/README.md index 8a02b82..6369dec 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ Identifies bots by sending nearby players' information to a third-party machine | Panel Settings | Show Feedback Textbox | Adds a textbox to the prediction feedback panel, so you can explain your choice in up to 250 characters. Make sure you type your feedback *before* you make your choice! | | Panel Settings | Panel Default Stats Tab | Sets panel default stats tab when the Plugin turns on. | | Panel Settings | Panel Font Size | Sets the font size of most of the Plugin's Panel elements. | -| 'Predict' Settings | Right-click 'Predict' Players | Allows you to right-click predict players, instead of having to type their name in the Plugin's panel manually. | +| 'Predict' Settings | Right-click 'Predict' Players | Allows you to right-click predict players in the game world, instead of having to type their name in the Plugin's panel manually. | +| 'Predict' Settings | Right-click 'Predict' Menus | Allows you to right-click predict players in interfaces. | | 'Predict' Settings | 'Predict' on Right-click 'Report' | If you right-click Report someone via Jagex's official in-game report system, the player will be automatically predicted in the Plugin's Panel. | | 'Predict' Settings | 'Predict' Copy Name to Clipboard | Copies the predicted player's name to your clipboard when right-click predicting. | | 'Predict' Settings | 'Predict' Default Color | If set, highlights unflagged/unfeedbacked players' 'Predict' option in the given color so that you can easily spot it on the in-game menu. | diff --git a/src/main/java/com/botdetector/BotDetectorConfig.java b/src/main/java/com/botdetector/BotDetectorConfig.java index 96f5368..dc7bade 100644 --- a/src/main/java/com/botdetector/BotDetectorConfig.java +++ b/src/main/java/com/botdetector/BotDetectorConfig.java @@ -42,7 +42,8 @@ public interface BotDetectorConfig extends Config String CONFIG_GROUP = "botdetector"; String ONLY_SEND_AT_LOGOUT_KEY = "sendAtLogout"; String AUTO_SEND_MINUTES_KEY = "autoSendMinutes"; - String ADD_PREDICT_OPTION_KEY = "addDetectOption"; // I know it says detect, don't change it. + String ADD_PREDICT_PLAYER_OPTION_KEY = "addDetectOption"; // I know it says detect, don't change it. + String ADD_PREDICT_MENU_OPTION_KEY = "addPlayerMenuOption"; String ANONYMOUS_UPLOADING_KEY = "enableAnonymousReporting"; String PANEL_FONT_TYPE_KEY = "panelFontType"; String AUTH_FULL_TOKEN_KEY = "authToken"; @@ -197,18 +198,30 @@ default PanelFontType panelFontType() @ConfigItem( position = 1, - keyName = ADD_PREDICT_OPTION_KEY, + keyName = ADD_PREDICT_PLAYER_OPTION_KEY, name = "Right-click 'Predict' Players", - description = "Adds an entry to player menus to quickly check them in the prediction panel.", + description = "Adds an entry to game world player menus to quickly check them in the prediction panel.", section = predictSection ) - default boolean addPredictOption() + default boolean addPredictPlayerOption() { return false; } @ConfigItem( position = 2, + keyName = ADD_PREDICT_MENU_OPTION_KEY, + name = "Right-click 'Predict' Menus", + description = "Adds an entry to interface player menus to quickly check them in the prediction panel.", + section = predictSection + ) + default boolean addPredictMenuOption() + { + return false; + } + + @ConfigItem( + position = 3, keyName = "predictOnReport", name = "'Predict' on Right-click 'Report'", description = "Makes the in-game right-click 'Report' option also open the prediction panel.", @@ -220,7 +233,7 @@ default boolean predictOnReport() } @ConfigItem( - position = 3, + position = 4, keyName = "predictOptionCopyName", name = "'Predict' Copy Name to Clipboard", description = "Copies the player's name to the clipboard when right-click predicting a player.", @@ -232,7 +245,7 @@ default boolean predictOptionCopyName() } @ConfigItem( - position = 4, + position = 5, keyName = "predictOptionDefaultColor", name = "'Predict' Default Color", description = "When right-clicking on a player, the predict option will be this color by default.", @@ -241,7 +254,7 @@ default boolean predictOptionCopyName() Color predictOptionDefaultColor(); @ConfigItem( - position = 5, + position = 6, keyName = "predictOptionFlaggedColor", name = "'Predict' Voted/Flagged Color", description = "When right-clicking on a player that has been flagged or given feedback, the predict option will be this color instead.", @@ -250,7 +263,7 @@ default boolean predictOptionCopyName() Color predictOptionFlaggedColor(); @ConfigItem( - position = 6, + position = 7, keyName = "applyPredictColorsOnReportOption", name = "Apply Colors to 'Report'", description = "Applies the above 'Predict' color options to the in-game 'Report' option as well.", diff --git a/src/main/java/com/botdetector/BotDetectorPlugin.java b/src/main/java/com/botdetector/BotDetectorPlugin.java index 36b0135..6f925c6 100644 --- a/src/main/java/com/botdetector/BotDetectorPlugin.java +++ b/src/main/java/com/botdetector/BotDetectorPlugin.java @@ -357,7 +357,7 @@ protected void startUp() clientToolbar.addNavigation(navButton); - if (config.addPredictOption() && client != null) + if (config.addPredictPlayerOption() && client != null) { menuManager.addPlayerMenuItem(PREDICT_OPTION); } @@ -602,12 +602,12 @@ private void onConfigChanged(ConfigChanged event) switch (event.getKey()) { - case BotDetectorConfig.ADD_PREDICT_OPTION_KEY: + case BotDetectorConfig.ADD_PREDICT_PLAYER_OPTION_KEY: if (client != null) { menuManager.removePlayerMenuItem(PREDICT_OPTION); - if (config.addPredictOption()) + if (config.addPredictPlayerOption()) { menuManager.addPlayerMenuItem(PREDICT_OPTION); } @@ -959,7 +959,7 @@ private void statsChatCommand(ChatMessage chatMessage, String message) @Subscribe private void onMenuEntryAdded(MenuEntryAdded event) { - if (!config.addPredictOption()) + if (!config.addPredictMenuOption()) { return; }