You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+11-11
Original file line number
Diff line number
Diff line change
@@ -15,26 +15,28 @@
15
15
> Developers and translators are welcome to join the CubeGPT Team!
16
16
17
17
## Introduction
18
-
> Give GPT your idea, AI generates customized Minecraft server plugins with one click, which is suitable for Bukkit, Spigot, Paper, Purpur, Arclight, CatServer, Magma, Mohist and other Bukkit-based servers.
18
+
> Give the LLM your idea, AI generates customized Minecraft server plugins with one click, which is suitable for Bukkit, Spigot, Paper, Purpur, Arclight, CatServer, Magma, Mohist and other Bukkit-based servers.
19
19
20
-
BukkitGPT is an open source, free, AI-powered Minecraft Bukkit plugin generator. It was developed for minecraft server owners who are not technically savvy but need to implement all kinds of customized small plugins. From code to build, debug, all done by gpt.
20
+
BukkitGPT is an open source, free, AI-powered Minecraft Bukkit plugin generator. It was developed for minecraft server owners who are not technically savvy but need to implement all kinds of customized small plugins. From code to build, debug, all done by the LLM.
21
21
22
-
## WebApp
22
+
<details>
23
+
<summary>The WebApp Edition: Generate plugin on a website, available even on your phone!</summary>
23
24
> [!WARNING]
24
25
> There're big differences between *BukkitGPT(-v3)* and *BukkitGPT WebApp*. The BukkitGPT is a self-hosted, free, open-source, community-driven project, while the BukkitGPT WebApp is a paid, cloud-hosted service that provides a more user-friendly experience for non-developers.
25
26
> Issues and questions about BukkitGPT WebApp should be directed to our [Discord Server](https://discord.gg/kTZtXw8s7r).
26
27
27
-
Don't want to prepare the Python & Maven environment? Try our [WebApp](http://cubegpt.org/), designed for non-developers, just enter the plugin name and description, and you can get the plugin jar file.
28
+
Don't want to deal with Python, Maven, BuildTools, and other complicated environments?
29
+
Hey! Here's [the WebApp version](https://webapp.cubegpt.org) designed just for you - generate plugins **even on your phone**!
28
30
29
31
*The service is paid since the API key we are using is not free. You can get 1 key for 5 generations for $1 [here](https://ko-fi.com/s/cd5d4fcaba) or [here (for Chinese users)](https://afdian.com/item/b839835461e311efbd1252540025c377)
Copy file name to clipboardexpand all lines: config.py
+1-5
Original file line number
Diff line number
Diff line change
@@ -15,12 +15,8 @@ def load_config():
15
15
withopen("config.yaml", "r") asconf:
16
16
config_content=yaml.safe_load(conf)
17
17
forkey, valueinconfig_content.items():
18
-
ifkey=="GENERATE_MODEL"andvalue=="gpt-4":
19
-
globals()[
20
-
key
21
-
] ="gpt-4-turbo-preview"# Force using gpt-4-turbo-preview if the user set the GENERATE_MODEL to gpt-4. Because gpt-4 is not longer supports json modes.
You should output one and only one JSON containing all the final codes inside a ```json``` tag. You can response other stuffs like your plan, steps and explainations outside the ```json``` tag. Only the json code inside the ```json``` tag will be used to apply the edit and text outside will be ignored.
28
+
30
29
This JSON contains an array under the key `codes`, where each element represents a file with its path and content for a Minecraft plugin project setup. Here’s a more detailed breakdown:
Content: The main Java class implementing the plugin's core functionality. It includes essential imports (import org.bukkit.Bukkit;) and extends JavaPlugin while implementing CommandExecutor.
If the user ask you to add a new item, as you are not able to generate textures, you should use the texture of a similar item of vanilla minecraft. For example: Mooncake -> Texture: Pumpkin Pie.
68
-
You should never response anything else. Never use Markdown format. Never write not compeleted codes, such as leave a comment that says "// Your codes here" or "// Not compeleted". Do not forget to add ";" in the java codes. Make sure your response is json formatted.
69
-
70
-
Special Requirement: No ANY line feeds. Here're some examples:
71
-
(eg. for java codes) package com.example.plugin; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin { public void onEnable() { getLogger().info("Plugin has been enabled!"); } }
72
-
(eg. for yaml files) {name: ExamplePlugin, main: com.example.example.plugin.Main, version: "1.0"}
73
-
Same for the xml file.
67
+
Never write not completed codes, such as leave a comment that says "// Your codes here" or "// Not completed". Do not forget to add ";" in the java codes. Make sure your response is json formatted.
74
68
75
69
USR_GEN: |
76
70
%DESCRIPTION%
77
71
78
-
SYS_FIX: |
79
-
You're a minecraft bukkit plugin coder AI. Game Version: 1.13.2 (1.13.2-R0.1-SNAPSHOT)
80
-
Fix the error in the code provided by user. The error message is also provided by the user.
\"code\": \"package ...;\\nimport org.bukkit.Bukkit;\\npublic class Main extends JavaPlugin implements CommandExecutor {\\n... (The code you need to write)\"
You should never response anything else. Never use Markdown format. Use \n for line feed, and never forget to use \ before ". Never write uncompeleted codes, such as leave a comment that says "// Your codes here" or "// Original code" or "// Uncompeleted".
103
-
104
-
USR_FIX: |
105
-
Main.java:
106
-
%MAIN_JAVA%
107
-
plugin.yml:
108
-
%PLUGIN_YML%
109
-
config.yml:
110
-
%CONFIG_YML%
111
-
pom.xml:
112
-
%POM_XML%
113
-
error message:
114
-
%P_ERROR_MSG%
72
+
SYS_EDIT: |
73
+
You're a minecraft bukkit plugin coder AI.
74
+
You're given the codes of a minecraft bukkit plugin and a request to edit the plugin.
75
+
You should edit the codes to meet the request.
76
+
You should use git diff (without index line) to show the changes you made.
77
+
78
+
For example, if the original code of codes/ExamplePlugin4/src/main/java/org/cubegpt/188eba63/Main.java is:
79
+
```java
80
+
1 package org.cubegpt._188eba63;
81
+
2
82
+
3 import org.bukkit.Bukkit;
83
+
4 import org.bukkit.event.EventHandler;
84
+
5 import org.bukkit.event.Listener;
85
+
6 import org.bukkit.event.player.PlayerJoinEvent;
86
+
7 import org.bukkit.plugin.java.JavaPlugin;
87
+
8
88
+
9 public class Main extends JavaPlugin implements Listener {
There could be multiple diffs, put each diff inside a markdown ```diff``` tag.
112
+
You can response other stuffs like your plan, steps and explainations outside the ```diff``` tag. Only the diffs inside the ```diff``` tag will be used to apply the edit and text outside will be ignored.
113
+
Make sure the diffs are valid and can be applied to the original code.
114
+
Do not forget to add ";" in the java codes.
115
+
116
+
There should be a empty pom.xml in the original code, and you should fill the pom.xml with things needed for the plugin to work. Always add this in pom.xml:
0 commit comments