From 2a40d3d7897e38074d72bfd437b1cbb527024f2d Mon Sep 17 00:00:00 2001 From: Cyborger1 <45152844+Cyborger1@users.noreply.github.com> Date: Sun, 23 Jun 2024 14:46:33 -0400 Subject: [PATCH 1/4] Add Harassment Warning and info --- .../com/botdetector/BotDetectorConfig.java | 24 ++++++++++++++++++ .../com/botdetector/BotDetectorPlugin.java | 7 +++++ .../com/botdetector/ui/BotDetectorPanel.java | 5 +++- src/main/java/com/botdetector/ui/Icons.java | 1 + .../com/botdetector/ui/strong_warning.png | Bin 0 -> 830 bytes 5 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/com/botdetector/ui/strong_warning.png diff --git a/src/main/java/com/botdetector/BotDetectorConfig.java b/src/main/java/com/botdetector/BotDetectorConfig.java index dc7bade7..41c8b82c 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,29 @@ 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 erroneous reductions in 'Real Player' confidence." + + "
" + + "
We ask that you do not harass players based on a potentially faulty prediction." + + "
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..8cf205f2 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, " DO NOT HARASS OTHER PLAYERS", + "We have received reports of legitimate players being harassed by users of this plugin." + + "
Turn off this warning 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 0000000000000000000000000000000000000000..7538df207fc679ad839f7c5565c801249405810e GIT binary patch literal 830 zcmV-E1Ht@>P)4Tx04UFukxeK>Q5?m8Geabz%tEqw3M*4WvSg@9jhY7KYvH{&W~h13^xnwE zQrRjC9~*;(jWt^fTcwnblAWCuv5}tteWPYlqujdPU+3O)y7ycN7P6-0R`q~o=bdCM zs!h+#YBkSP(L^)twCJXr8%`wRR2(0-1k`#HQCa+NG^7??69Ss>kePGx!VAI!Yx$hw zUE#2~q^E>Wg}WWOpzyuYjUvA&&iEWunPF!#IU*bu)-q*ml(D(wSi=3n9VyF}{NQwv zQ;OFWTiI3f=bq|?^^5k@gwkcU5o3&T5@;B#vP_md5m{|fT#~XMt>AC<{Rwdy;#$TO z$0#dU=)NEI2fw>@(|x_gr1~gSKY89;C)8}i*Oupf9(vx_5riJ$!Y=t&3NZLC`c_Hn zIDp0tIJ+!q#txisLd!!=cXVG0$qc5`@OmQOGy~1oP&ZfX?Ps6kJD8NN;#aV@4_z6_ zp0Duk+VbB1JmdFA^c!51a-I<+O3VNN010qNS#tmY3ljhU3ljkVnw%H_00Cl2L_t(I zPnD9-D@0Kg$Ip8hltz>VMaVo8Au)EcQWg@*)GSOQQmifgD^vaeTMK`LVr5G2*;HGsD6Ry2C;ETrj)nA5&fzy@9v%$_!Y#CyQ!oy-vE;)V4kQQ zZg|Z=V$ISl(XjghcMsp%a%9dLsOmdL=_gErYhZgC$2d17CoOYP zcdmhDc5<`?YVj@NlcvEX$o@B!(vIY=z>J(AX`nmSL75#<0jWl#%V2yCd7vI`A=7Y} zhj|8UjauI!hASE^_UVX`4|eg3e7L&PIY<;!ThXQ;P$l>z`U!Q=h>I?`mUoktIGRua z%SBHZN<1ObDJVPWasuZ8Sa0 Date: Sun, 23 Jun 2024 19:37:32 -0400 Subject: [PATCH 2/4] Contract "DO NOT" to "DON'T" to avoid ellipses --- src/main/java/com/botdetector/ui/BotDetectorPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/botdetector/ui/BotDetectorPanel.java b/src/main/java/com/botdetector/ui/BotDetectorPanel.java index 8cf205f2..44b7ac5a 100644 --- a/src/main/java/com/botdetector/ui/BotDetectorPanel.java +++ b/src/main/java/com/botdetector/ui/BotDetectorPanel.java @@ -121,7 +121,7 @@ public enum WarningLabel "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."), - HARASSMENT_WARNING(Icons.STRONG_WARNING_ICON, " DO NOT HARASS OTHER PLAYERS", + HARASSMENT_WARNING(Icons.STRONG_WARNING_ICON, " DON'T HARASS OTHER PLAYERS", "We have received reports of legitimate players being harassed by users of this plugin." + "
Turn off this warning in the plugin's config.") ; From 1feff561a71c48bd7b39f2e56f649b359cba6e58 Mon Sep 17 00:00:00 2001 From: Cyborger1 <45152844+Cyborger1@users.noreply.github.com> Date: Mon, 24 Jun 2024 19:52:07 -0400 Subject: [PATCH 3/4] Some text changes --- src/main/java/com/botdetector/BotDetectorConfig.java | 4 ++-- src/main/java/com/botdetector/ui/BotDetectorPanel.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/botdetector/BotDetectorConfig.java b/src/main/java/com/botdetector/BotDetectorConfig.java index 41c8b82c..13648e1c 100644 --- a/src/main/java/com/botdetector/BotDetectorConfig.java +++ b/src/main/java/com/botdetector/BotDetectorConfig.java @@ -92,9 +92,9 @@ public interface BotDetectorConfig extends Config "
" + "
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 erroneous reductions in 'Real Player' confidence." + + "
our Machine Learning models, resulting in reductions in 'Real Player' confidence." + "
" + - "
We ask that you do not harass players based on a potentially faulty prediction." + + "
We ask that you do not harass players based on a misunderstanding of our predictions." + "
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." + "
" + diff --git a/src/main/java/com/botdetector/ui/BotDetectorPanel.java b/src/main/java/com/botdetector/ui/BotDetectorPanel.java index 44b7ac5a..3f9b1a13 100644 --- a/src/main/java/com/botdetector/ui/BotDetectorPanel.java +++ b/src/main/java/com/botdetector/ui/BotDetectorPanel.java @@ -121,7 +121,7 @@ public enum WarningLabel "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."), - HARASSMENT_WARNING(Icons.STRONG_WARNING_ICON, " DON'T HARASS OTHER PLAYERS", + 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." + "
Turn off this warning in the plugin's config.") ; From 83ff4d1013f293d061b009a648d703d80dad3feb Mon Sep 17 00:00:00 2001 From: Cyborger1 <45152844+Cyborger1@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:16:14 -0400 Subject: [PATCH 4/4] More text changes --- src/main/java/com/botdetector/BotDetectorConfig.java | 12 +++++++----- .../java/com/botdetector/ui/BotDetectorPanel.java | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/botdetector/BotDetectorConfig.java b/src/main/java/com/botdetector/BotDetectorConfig.java index 13648e1c..515010db 100644 --- a/src/main/java/com/botdetector/BotDetectorConfig.java +++ b/src/main/java/com/botdetector/BotDetectorConfig.java @@ -91,12 +91,14 @@ public interface BotDetectorConfig extends Config 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." + + "
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 players based on a misunderstanding of our predictions." + - "
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." + + "
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." diff --git a/src/main/java/com/botdetector/ui/BotDetectorPanel.java b/src/main/java/com/botdetector/ui/BotDetectorPanel.java index 3f9b1a13..846dec80 100644 --- a/src/main/java/com/botdetector/ui/BotDetectorPanel.java +++ b/src/main/java/com/botdetector/ui/BotDetectorPanel.java @@ -123,7 +123,7 @@ public enum WarningLabel + "
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." + - "
Turn off this warning in the plugin's config.") + "
You may remove this message by acknowledging and reading more about it in the plugin's config.") ; private final Icon image;