Skip to content

Add ConfigManager, ExampleCommand, and test infrastructure#9

Open
Nrleryx wants to merge 6 commits into
thehale:mainfrom
Nrleryx:main
Open

Add ConfigManager, ExampleCommand, and test infrastructure#9
Nrleryx wants to merge 6 commits into
thehale:mainfrom
Nrleryx:main

Conversation

@Nrleryx

@Nrleryx Nrleryx commented Dec 10, 2025

Copy link
Copy Markdown
Changes
  • Added ConfigManager class for configuration management
  • Added ExampleCommand with subcommands (reload, info, version)
  • Added config.yml with example configuration
  • Added unit test infrastructure with MockBukkit
  • Integrated ConfigManager into main plugin class
  • Updated plugin.yml with command and permission definitions
Benefits
  • Provides ready-to-use configuration management
  • Demonstrates command implementation with tab completion
  • Includes test examples for new developers

@thehale

thehale commented Dec 10, 2025

Copy link
Copy Markdown
Owner

Thanks for the PR. I'll take a look at it soon!

@Nrleryx

Nrleryx commented Dec 10, 2025

Copy link
Copy Markdown
Author

Thank you for the quick response! I'm happy to hear you'll be taking a look soon.

@thehale thehale linked an issue Dec 13, 2025 that may be closed by this pull request
MockBukkit.load doesn't accept a PluginDescriptionFile argument.

https://javadoc.io/doc/com.github.seeseemelk/MockBukkit-v1.21/3.129.0/be/seeseemelk/mockbukkit/MockBukkit.html#load(java.lang.Class,java.lang.Object...)

Looks like the method that does support a `PluginDescriptionFile` is `MockBukkit.loadWith`, but that's not necessary for the tests.
@Nrleryx

Nrleryx commented Dec 13, 2025

Copy link
Copy Markdown
Author

Thanks for the update and the fixes! Let me know if there’s anything else I should adjust on my side.

@thehale

thehale commented Dec 13, 2025

Copy link
Copy Markdown
Owner

I have a bit more to go through (it's been about 2 years since I looked at Minecraft plugin APIs 😅). Thanks for being patient!

I can do the rest of the fixes/updates that I want on my own. I can be a bit opinionated, and I don't expect you to read my mind on how the code should look (especially since I don't have any automated liners/formatters configured).

All that said, could you rebase your branch on the latest master? I pushed some fixes to my original build scripts there. (Not required, but it would make my life a bit easier).

@thehale

thehale commented Dec 13, 2025

Copy link
Copy Markdown
Owner

Side Note: Did you use any AI tools when creating this PR? If so, that's 100% okay but it's generally good practice to disclose that.

I was mostly surprised by the invocations of what appear to be non-existent APIs. But that could also be differences of environment. If the plugin compiles and passes tests on your machine (without my latest fixes), I'd love to know what you have that I don't.

Thanks again!

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.

Add a testing framework (JUnit + MockBukkit)

2 participants