Skip to content

CommandAPI Paper #2#656

Merged
DerEchtePilz merged 16 commits intodev/devfrom
dev/paper-commandapi-followup
Aug 20, 2025
Merged

CommandAPI Paper #2#656
DerEchtePilz merged 16 commits intodev/devfrom
dev/paper-commandapi-followup

Conversation

@DerEchtePilz
Copy link
Copy Markdown
Member

@DerEchtePilz DerEchtePilz commented Jul 16, 2025

Resolves #651

This is a small follow-up for #517 and addresses a few issues that were not crucial to get #517 to work but still have to be addressed before releasing. There are a few things that still need to be done here:

  • README.md updates
  • There is at least one instance where CommandAPIBukkit is mentioned in a message when the proper platform should be mentioned instead
  • Also, it could be nice to add one or two additional lines of start-up logs. Currently it would probably just log CommandAPIPaper > CommandAPIBukkit, however I think it would be useful (mainly for us when people ask for support) to at least log the PaperNMS class. This should, if added, also be applied to the Spigot implementation if applicable.

@DerEchtePilz DerEchtePilz force-pushed the dev/paper-commandapi-followup branch from 967849d to a1c1c8c Compare July 23, 2025 12:19
Copy link
Copy Markdown
Collaborator

@willkroboth willkroboth left a comment

Choose a reason for hiding this comment

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

The GitHub Actions build is currently failing due to a javadocs error (see 4a101ab).

GitHub didn't let me comment this on the appropriate lines, but I don't think the generic parameter of CommandAPIPaperConfig does anything.

- public class CommandAPIPaperConfig<T extends LifecycleEventOwner> extends CommandAPIBukkitConfig<CommandAPIPaperConfig<T>> {
+ public class CommandAPIPaperConfig extends CommandAPIBukkitConfig<CommandAPIPaperConfig> {

IMO the javadocs on the constructor should also probably not use fully qualified names, since they appear fully qualified in the pop up if they aren't imported in the class.

image

See b4747b5#diff-07f13e9808547824ce44db9baab74a0a21b74a38d710c7c0deefbb486d655afe for the changes I suggested in CommandAPIPaperConfig.


public APITypeProvider(PaperNMS<?> paperNMS) {
this.paperNMS = paperNMS;
this.paperNMS = (PaperNMS<CommandSourceStack>) paperNMS;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Every single time paperNMS is referenced (except once in createCommandRegistrationStrategy), it is just used to call paperNMS.bukkitNMS(). It seems like this class could use direct access to bukkitNMS rather than calling the method every single time.

Suggested change
this.paperNMS = (PaperNMS<CommandSourceStack>) paperNMS;
this.bukkitNMS = paperNMS.bukkitNMS();
this.commandRegistrationStrategy = paperNMS.createCommandRegistrationStrategy();

Copy link
Copy Markdown
Collaborator

@willkroboth willkroboth left a comment

Choose a reason for hiding this comment

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

I noticed that there are files in commandapi-spigot-documentation-code and commandapi-paper-documentation-code. Don't know if you want to remove those now, or later when doing the docs PR.

@DerEchtePilz
Copy link
Copy Markdown
Member Author

I noticed that there are files in commandapi-spigot-documentation-code and commandapi-paper-documentation-code. Don't know if you want to remove those now, or later when doing the docs PR.

Yeah, left those in so I know what I need for the documentation. They are only temporary which is also why they are not being compiled.

@DerEchtePilz DerEchtePilz merged commit 561f658 into dev/dev Aug 20, 2025
2 of 4 checks passed
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.

2 participants