Add ConfigManager, ExampleCommand, and test infrastructure#9
Conversation
Nrleryx
commented
Dec 10, 2025
- 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
- Provides ready-to-use configuration management
- Demonstrates command implementation with tab completion
- Includes test examples for new developers
|
Thanks for the PR. I'll take a look at it soon! |
|
Thank you for the quick response! I'm happy to hear you'll be taking a look soon. |
YamlConfiguration.load doesn't support a raw InputStream. https://hub.spigotmc.org/javadocs/spigot/org/bukkit/configuration/file/YamlConfiguration.html#loadConfiguration(java.io.File)
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.
|
Thanks for the update and the fixes! Let me know if there’s anything else I should adjust on my side. |
|
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 |
|
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! |
This reverts commit 9f218dc.