I’m excited to share a breakthrough tool bolt.new that will help you create a complete Minecraft plugin from scratch – even if you have never coded anything before.
If you’ve tried creating Minecraft plugins with AI before, you know the usual process: you write a prompt, get some broken code back, spend time fixing it, and need significant Java knowledge to make everything work. It’s typically a back-and-forth process that can take 30 minutes or more.
But today’s video will be different. We’ll be creating a fully functional plugin in under a minute – one that connects to OpenAI’s moderation API to filter chat messages in real-time – with just one prompt.
Resources
- First bolt.new project: https://bolt.new/~/sb1-sn4ngemk
- Second project (the one I show in the video): https://bolt.new/~/sb1-zl3yspeq
Using Bolt.New
After testing various AI coding assistants, I’ve found Bolt.new to be particularly effective for Minecraft plugin development.
Bolt.new consistently produces cleaner, more reliable code for our needs.
The biggest difference between Bolt.new and ChatGPT is that Bolt sees your entire codebase and can generate the entire plugin source code folder.
With one click.
Creating the Plugin
Step 1: The Prompt
Here’s the prompt I used in Bolt.new:
You are developing a Minecraft plugin to moderate chat using AI for Paper API using Maven.
Tech stack:
- Maven
- Paper API 1.21.4.
- Use openai/openai-java library.
- Use web to fetch latest versions of dependencies.
How it works:
- It listens to the chat event and uses OpenAI moderation endpoint to block a message which triggers any of the moderational sections, see moderation.txt.
- The thresholds and warning messages are configurable within config.yml.
How code should look like:
- Use lombok for getters, setters and constructors.
- Use fully qualified variable names, i.e. player instead of p.
- Keep consistent naming conventions and always use "this". Add "final" if possible.
- Check for errors and handle null safety.
- Store a static plugin's instance in its main class and access it instead of passing it in another classes' constructors.
Do not use any openai library and implement http requests yourself using native java and Gson
Start by writing a PLAN.md with the developmental outline for the project and then implement all steps.
Step 2: Development Setup
- Download the generated project from Bolt.new
- Open in your preferred IDE (in the video above, I used IntelliJ)
- Adjust the code as needed.
- Run Maven “clean install” run configuration to export your plugin into a jar (I show this in the above video).
Server Configuration
- Install the plugin in your server’s plugins folder
- Add your OpenAI API key to the config.yml
- Configure moderation thresholds if desired
- Restart your server
How It Works
The plugin processes chat messages with a small delay (0.3-0.4 seconds) due to the API communication:
- Captures the chat event
- Sends content to OpenAI
- Receives moderation analysis
- Applies configured actions based on the response
Note: The delay varies based on your server’s proximity to OpenAI’s infrastructure.
Warning: You Still Need To Know Java
While this AI-powered approach significantly speeds up development, understanding Java remains crucial.
If you want to improve your Java skills, develop Minecraft plugins and scale your network, check out Project Orion™. It’s a step-by-step Java, Spigot and Paper API training with no previous coding experience needed.
You’ll be making minigames such as BedWars, SkyBlcok, custom mobs, anti-piracy, dungeons, claims using the Paper API supported by hours of video training, 2x weekly Zoom calls, a certificate of completion, JetBrains premium license and a 4,000+ member community. Project Orion™ is rated #1 Minecraft training in the world, click here to start coding your own Minecraft plugins!
Happy coding!
-Matej