Troubleshooting
How to test a new Minecraft plugin safely before it goes live
A practical checklist for testing a plugin you made or generated: a copy of your server, what to read in the console, edge cases and how to roll back.
Whether you wrote a plugin by hand, took it from a forum or had an AI make it, test it before your players see it. A good test takes ten minutes and catches almost everything that would otherwise cost you a restart or a rollback.
1. Use a copy, not the live server
Copy the server folder to a second place, change the port in server.properties and start it. For a quick check a fresh local Paper server also works. Either way, players and real worlds stay safe.
2. Read the console on start
- Look for the "Enabling" line of your plugin. No line means it did not load.
- Red or yellow lines with the plugin name are worth reading. A stack trace names the class and the line.
- Check the world and data files the plugin creates inside its folder.
3. Try the normal use
Run every command with the arguments from your description. Check the messages, the numbers from config.yml and that data survives a restart if the plugin saves anything.
4. Try to break it
- Run each command with no arguments, with a wrong argument and with a name that does not exist.
- Run it from the console, where there is no player.
- Use a second account with no permissions and one that has them.
- Test with the cooldown: use the command twice quickly.
- Leave and rejoin in the middle of an action, such as a teleport countdown.
5. Watch performance
A plugin that runs a task every tick or loops over every block can slow the server. Paper has a /spark profiler plugin and a timings report. If the tick rate drops with only your plugin active, ask for a lighter approach.
6. Have a way back
Keep the old jar and a backup of the plugin folder. If something is wrong on the live server, stop it, put the old jar back and start again. If the plugin changed player data, restore the data backup too.
A test checklist you can copy
- Back up the plugin folder and the worlds.
- Start a copy of the server on another port.
- Read the start-up log for the plugin name.
- Run each command with no arguments, correct arguments and wrong ones.
- Test with and without permission.
- Restart and check that saved data is still there.
- Leave the plugin running with a few players for an hour and watch the tick rate.
Reading a stack trace
When an error appears, look for the first line that mentions your plugin's package, for example dev.example.homes. That line names the class and the line number where it failed. The lines above it are the server calling your code and are usually not the problem. Paste the stack trace into the chat of the generator and ask for a fix.
Frequently asked questions
How do I test with several players alone?
Use a second account or an offline-mode test server, and join with two game clients. A friend helps for real interaction.
Should I test on every Minecraft version I support?
Test on the version you run in production. Compile for each version you support and run at least one startup test on it.
What is the safest rollback?
Keep the previous jar and a copy of the data folder. Restore both and start the server.