diff --git a/src/main/java/com/botdetector/BotDetectorConfig.java b/src/main/java/com/botdetector/BotDetectorConfig.java index dc7bade7..515010db 100644 --- a/src/main/java/com/botdetector/BotDetectorConfig.java +++ b/src/main/java/com/botdetector/BotDetectorConfig.java @@ -50,6 +50,7 @@ public interface BotDetectorConfig extends Config String SHOW_FEEDBACK_TEXTBOX = "showFeedbackTextbox"; String SHOW_DISCORD_VERIFICATION_ERRORS = "showDiscordVerificationErrors"; String ANONYMOUS_UUID_KEY = "anonymousUUID"; + String ACKNOWLEDGED_HARASSMENT_WARNING_KEY = "acknowledgedHarassmentWarning"; int AUTO_SEND_MINIMUM_MINUTES = 5; int AUTO_SEND_MAXIMUM_MINUTES = 360; @@ -82,6 +83,31 @@ public interface BotDetectorConfig extends Config ) String miscSection = "miscSection"; + @ConfigItem( + position = 1, + keyName = ACKNOWLEDGED_HARASSMENT_WARNING_KEY, + name = "Acknowledge Harassment Warning", + description = "Set this config to acknowledge you understand not to harass other players while using this plugin.", + warning = "We have received reports of legitimate players being harassed by users of this plugin." + + "
" + + "
Bot predictions from this plugin are not to be taken at face value, as players with lower" + + "
total XP or account builds that generally deviate from the expected average may throw" + + "
off our Machine Learning models, resulting in reductions in 'Real Player' confidence." + + "
" + + "
We ask that you do not harass other players based on our predictions." + + "
Harassment never helps, as bots do not care and legitimate players suffer unnecessarily." + + "
" + + "
For more context, please read the plugin's FAQ, available on both the plugin's GitHub" + + "
page and our Discord server before you continue using the plugin." + + "
" + + "
Thank you," + + "
- The Bot Detector team." + ) + default boolean acknowledgedHarassmentWarning() + { + return false; + } + @ConfigItem( position = 1, keyName = ANONYMOUS_UPLOADING_KEY, diff --git a/src/main/java/com/botdetector/BotDetectorPlugin.java b/src/main/java/com/botdetector/BotDetectorPlugin.java index 2042dfbb..af3726ab 100644 --- a/src/main/java/com/botdetector/BotDetectorPlugin.java +++ b/src/main/java/com/botdetector/BotDetectorPlugin.java @@ -332,6 +332,7 @@ protected void startUp() SwingUtilities.invokeLater(() -> { panel.setWarningVisible(BotDetectorPanel.WarningLabel.ANONYMOUS, config.enableAnonymousUploading()); + panel.setWarningVisible(BotDetectorPanel.WarningLabel.HARASSMENT_WARNING, !config.acknowledgedHarassmentWarning()); panel.setPluginVersion(detectorClient.getPluginVersion()); panel.setNamesUploaded(0, false); panel.setNamesUploaded(0, true); @@ -615,6 +616,12 @@ private void onConfigChanged(ConfigChanged event) panel.forceHideFlaggingPanel(); }); break; + case BotDetectorConfig.ACKNOWLEDGED_HARASSMENT_WARNING_KEY: + SwingUtilities.invokeLater(() -> + panel.setWarningVisible( + BotDetectorPanel.WarningLabel.HARASSMENT_WARNING, + !config.acknowledgedHarassmentWarning())); + break; case BotDetectorConfig.PANEL_FONT_TYPE_KEY: SwingUtilities.invokeLater(() -> panel.setFontType(config.panelFontType())); break; diff --git a/src/main/java/com/botdetector/ui/BotDetectorPanel.java b/src/main/java/com/botdetector/ui/BotDetectorPanel.java index e7cb4278..846dec80 100644 --- a/src/main/java/com/botdetector/ui/BotDetectorPanel.java +++ b/src/main/java/com/botdetector/ui/BotDetectorPanel.java @@ -120,7 +120,10 @@ public enum WarningLabel NAME_ERROR(Icons.ERROR_ICON, " Invalid Player Name", "Your player name could not be loaded correctly." + "
Most likely you spawned on Tutorial Island or your name was forcibly reset by Jagex." - + "
Try relogging after setting a name.") + + "
Try relogging after setting a name."), + HARASSMENT_WARNING(Icons.STRONG_WARNING_ICON, " Please Don't Harass Players", + "We have received reports of legitimate players being harassed by users of this plugin." + + "
You may remove this message by acknowledging and reading more about it in the plugin's config.") ; private final Icon image; diff --git a/src/main/java/com/botdetector/ui/Icons.java b/src/main/java/com/botdetector/ui/Icons.java index 48b2c54c..9ffc993e 100644 --- a/src/main/java/com/botdetector/ui/Icons.java +++ b/src/main/java/com/botdetector/ui/Icons.java @@ -39,6 +39,7 @@ public class Icons public static final ImageIcon WEB_ICON = new ImageIcon(ImageUtil.loadImageResource(PLUGIN_CLASS, "web.png")); public static final ImageIcon TWITTER_ICON = new ImageIcon(ImageUtil.loadImageResource(PLUGIN_CLASS, "twitter.png")); public static final ImageIcon WARNING_ICON = new ImageIcon(ImageUtil.loadImageResource(PLUGIN_CLASS, "warning.png")); + public static final ImageIcon STRONG_WARNING_ICON = new ImageIcon(ImageUtil.loadImageResource(PLUGIN_CLASS, "strong_warning.png")); public static final ImageIcon ERROR_ICON = new ImageIcon(ImageUtil.loadImageResource(PLUGIN_CLASS, "error.png")); // Must not be ImageUtil.loadImageResource as it produces a static image diff --git a/src/main/resources/com/botdetector/ui/strong_warning.png b/src/main/resources/com/botdetector/ui/strong_warning.png new file mode 100644 index 00000000..7538df20 Binary files /dev/null and b/src/main/resources/com/botdetector/ui/strong_warning.png differ