Skip to content

Remove /aaf ips command that exposes player IP addresses - Issue #44#57

Open
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-35e00dee-1e25-4080-9a44-25dc9ac757ca
Open

Remove /aaf ips command that exposes player IP addresses - Issue #44#57
Copilot wants to merge 3 commits intomasterfrom
copilot/fix-35e00dee-1e25-4080-9a44-25dc9ac757ca

Conversation

Copy link
Copy Markdown

Copilot AI commented Sep 21, 2025

  • Analyze issue Remove /aaflist addresses command. #44: Remove /aaflist addresses command due to security concerns about exposing IP addresses
  • Explore repository structure and understand the command system
  • Identify that the issue refers to /aaf ips command which exposes player IP addresses
  • Remove the /aaf ips command and AafIpsCommand class
  • Update the main AafCommand to remove references to the ips command
  • Update plugin.yml to remove the permission for the removed command
  • Remove click event references to the deleted ips command from other commands
  • Clean up unused imports in modified files
  • Address code review feedback: Replace double-brace initialization with regular initialization in constructor

Summary of Changes:

  • Deleted AafIpsCommand.java - the command that listed IP addresses for players
  • Updated AafCommand.java to remove all references to the ips command and its handling
  • Updated plugin.yml to remove the /aaf ips command description and aaf.ips permission
  • Removed click event links in AafAccountsCommand.java and AafAltsCommand.java that referenced the deleted ips command
  • Cleaned up unused imports related to removed click/hover events
  • Replaced double-brace initialization with regular list initialization to avoid anonymous class overhead

The /aaf ips [player] command that exposed player IP addresses has been completely removed to address the security concern raised in the issue.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@dmccoystephenson
Copy link
Copy Markdown
Member

@copilot Try again

@dmccoystephenson
Copy link
Copy Markdown
Member

@copilot Continue work on this

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Sep 23, 2025

@copilot Continue work on this

I have completed the work to remove the /aaf ips command that exposed player IP addresses as requested in issue #44. The command has been completely removed along with all related functionality and permissions. Commit c9e3700 addresses this security concern.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • hub.spigotmc.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.1.1-bin/9wiye5v2saajue4irfo8ybqfp/gradle-8.1.1/lib/gradle-launcher-8.1.1.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.1.1-bin/9wiye5v2saajue4irfo8ybqfp/gradle-8.1.1/lib/agents/gradle-instrumentation-agent-8.1.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.1.1 (dns block)
  • jitpack.io
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.1.1-bin/9wiye5v2saajue4irfo8ybqfp/gradle-8.1.1/lib/gradle-launcher-8.1.1.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.1.1-bin/9wiye5v2saajue4irfo8ybqfp/gradle-8.1.1/lib/agents/gradle-instrumentation-agent-8.1.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.1.1 (dns block)
  • repo.rpkit.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -XX:MaxMetaspaceSize=384m -XX:&#43;HeapDumpOnOutOfMemoryError -Xms256m -Xmx512m -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.1.1-bin/9wiye5v2saajue4irfo8ybqfp/gradle-8.1.1/lib/gradle-launcher-8.1.1.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.1.1-bin/9wiye5v2saajue4irfo8ybqfp/gradle-8.1.1/lib/agents/gradle-instrumentation-agent-8.1.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.1.1 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] @Dans-Plugins/AlternateAccountFinder/issues/44 Remove /aaf ips command that exposes player IP addresses - Issue #44 Sep 23, 2025
@dmccoystephenson dmccoystephenson marked this pull request as ready for review September 23, 2025 02:47
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the /aaf ips subcommand from AlternateAccountFinder to prevent exposing player IP address history, per issue #44.

Changes:

  • Deletes the AafIpsCommand implementation and removes routing/tab-completion hooks from the root /aaf command.
  • Updates plugin.yml to remove the aaf.ips permission and the /aaf ips command help text.
  • Removes click/hover UI elements in command output that previously linked to /aaf ips.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main/resources/plugin.yml Removes /aaf ips help text and aaf.ips permission node.
src/main/java/com/dansplugins/detectionsystem/commands/AafIpsCommand.java Deletes the command that displayed player IP addresses.
src/main/java/com/dansplugins/detectionsystem/commands/AafCommand.java Removes subcommand dispatch and tab completion for ips.
src/main/java/com/dansplugins/detectionsystem/commands/AafAltsCommand.java Removes hover/click action that invoked /aaf ips.
src/main/java/com/dansplugins/detectionsystem/commands/AafAccountsCommand.java Removes hover/click action that invoked /aaf ips.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 22 to 25
private final List<String> subcommands = new ArrayList<>() {{
addAll(accountsAliases);
addAll(ipsAliases);
addAll(altsAliases);
}};
Copy link

Copilot AI Feb 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subcommands is built using double-brace initialization (new ArrayList<>() {{ ... }}), which creates an anonymous class and can retain an implicit reference to the outer instance. Consider replacing this with a regular initialization (e.g., create the list normally and addAll, or build an immutable list) to avoid the anonymous class overhead and improve maintainability.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced the double-brace initialization with regular list initialization in the constructor to avoid the anonymous class overhead. Commit a62a64f addresses this concern.

@dmccoystephenson
Copy link
Copy Markdown
Member

@copilot address comments

Co-authored-by: dmccoystephenson <21204351+dmccoystephenson@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Feb 3, 2026

@copilot address comments

Addressed the code review feedback about double-brace initialization. The subcommands list is now initialized normally in the constructor. Commit a62a64f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants