Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add /powertoollist #6096

Open
wants to merge 2 commits into
base: 2.x
Choose a base branch
from
Open

Conversation

jstnf
Copy link

@jstnf jstnf commented Mar 20, 2025

Information

This PR closes #6095.

Details

Proposed feature:

This PR implements /powertoollist, which lists out all of a user's set powertools.

Since all of a user's powertools reside within UserData, I utilized this Map to query through all of a user's powertools.

Environments tested:

OS: MacOS Apple chip

Java version: 22.0.2

  • Most recent Paper version (1.XX.Y, git-Paper-BUILD)
  • CraftBukkit/Spigot/Paper 1.12.2
  • CraftBukkit 1.8.8
[20:36:06] [Server thread/INFO]: This server is running CraftBukkit version 4457-Spigot-73860e0-f0c8dd3 (MC: 1.21.4) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
[20:36:06] [Server thread/INFO]: Checking version, please wait...
[20:36:06] [Thread-9/INFO]: You are running the latest version

Demonstration:

https://youtu.be/tgOr-fbHRAg

@jstnf jstnf marked this pull request as ready for review March 20, 2025 01:38
@pop4959
Copy link
Member

pop4959 commented Mar 20, 2025

Is there a reason you opted for a separate command rather than adding this functionality to the existing power tool command? The issue seems to imply that the command already handled it somewhat.

@jstnf
Copy link
Author

jstnf commented Mar 20, 2025

Yes, I opted for a separate command because /pt seems to handle individual items only (i.e. with l: argument). Adding a new command made sense to me since this is scoped to all powertools rather than just the held item.

@jstnf
Copy link
Author

jstnf commented Mar 20, 2025

Furthermore, future work can be done to query other players (i.e. /ptlist [player]), which may be more confusing if done with the already implemented /pt.

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.

Command to list all user powertools
2 participants