MagicCommands Plugin Documentation
Overview
MagicCommands is a Minecraft Paper/Spigot plugin that leverages the OpenAI ChatGPT API to execute or suggest Minecraft commands based on user input. Players can use the
/magic,
/magicspell, and
/magicquestion commands to interact with the plugin. The plugin can process natural language requests and convert them into executable Minecraft commands or provide helpful answers to Minecraft-related questions.
Features
- /magic: Converts player requests into Minecraft commands and executes them.
- /magicspell: Converts player requests into Minecraft commands and suggests them, allowing the player to edit before execution.
- /magicquestion: Answers Minecraft-related questions and displays the response to the player.
- Plugin Integration: Automatically detects installed plugins and informs the ChatGPT model, allowing it to use plugin-specific commands.
Requirements
- Minecraft Paper Server
- OpenAI API Key
Installation
- Download the Plugin
- Place the MagicCommands.jar file in the plugins directory of your Paper server.
- Configure the Plugin
- Start the server to generate the default configuration files.
- Stop the server.
- Acquire an OpenAI API Key
- Visit the OpenAI website to sign up for an account.
- Once signed in, navigate to the API section and generate a new API key.
- Configure the API Key
- Open the config.yml file located in the plugins/MagicCommands directory.
- Add your OpenAI API key to the api-key field.
- Start the Server
- Restart the server to apply the configuration changes.
Usage
/magic Command
- Description: Converts natural language requests into Minecraft commands and executes them immediately.
- Usage: /magic
- Example:
- Player types: /magic
- Plugin prompts: "What do you want to do?"
- Player responds: "Give me a diamond pickaxe with silk touch."
- Plugin processes the request and executes the command: /give @p diamond_pickaxe{Enchantments:[{id:silk_touch,lvl:1}]}
/magicspell Command
- Description: Converts natural language requests into Minecraft commands and suggests them for player approval/editing.
- Usage: /magicspell
- Example:
- Player types: /magicspell
- Plugin prompts: "What spell do you want to cast?"
- Player responds: "Summon a zombie with diamond armor."
- Plugin processes the request and suggests the command: /summon zombie ~ ~ ~ {ArmorItems:[{},{},{},{id:"minecraft:diamond_helmet",Count:1}]}
- Player clicks the suggestion to edit/execute it.
/magicquestion Command
- Description: Answers Minecraft-related questions and displays the response to the player.
- Usage: /magicquestion
- Example:
- Player types: /magicquestion
- Plugin prompts: "What is your question?"
- Player responds: "How do I make a chicken farm?"
- Plugin processes the request and responds: "To make a chicken farm, build a small pen with fences, lure chickens into it using seeds, and then breed them with seeds."
Configuration
The config.yml file includes the following options:
api-key: YOUR_API_KEY_HERE
installed-plugins: ""