Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Adventure | 521 | 3 | 9 | 2 days ago | 6 | April 17, 2020 | 86 | mit | Java | |
A user-interface library, formerly known as text, for Minecraft: Java Edition | ||||||||||
Bridge. | 305 | 3 months ago | 36 | gpl-3.0 | TypeScript | |||||
Minecraft Add-on Editor | We strive to provide the best development experience possible | ||||||||||
Editor | 102 | a month ago | 189 | gpl-3.0 | TypeScript | |||||
Next generation of bridge., the Minecraft Add-On editor | ||||||||||
Templateplugin | 80 | 22 days ago | gpl-3.0 | Java | ||||||
A template for creating minecraft plugin from 1.8 to 1.19 | ||||||||||
Flowupdater | 69 | 2 months ago | 13 | July 01, 2022 | gpl-3.0 | Java | ||||
The free and open source solution to update Minecraft. | ||||||||||
Vscode Bedrock Development Extension | 58 | 2 days ago | 2 | bsd-3-clause | JSON | |||||
An extension that provides support for files such as: .mcfunction, .json and .lang. Features include: completion, validations, formatters, diagnostics, cheat-sheets, code-actions, generation of files, and development tools to help develop Minecraft Bedrock Addons or Minecraft Education Edition. | ||||||||||
Okaeri Configs | 53 | 10 days ago | 4 | mit | Java | |||||
Simple Java/POJO config library written with love and Lombok | ||||||||||
Modulelauncher.re | 43 | 3 months ago | 1 | mit | C# | |||||
Cross-platform Minecraft Launcher library for .NET | ||||||||||
Mcwine | 38 | a day ago | mit | JSON | ||||||
Enhances the vanilla experience with optimization, accessibility & compatibility using complex modification. | ||||||||||
Minecraft Assets | 33 | 6 months ago | 3 | |||||||
Provide minecraft assets along with json files that help to use them. |
This library converts JSON files into a corresponding ArgumentBuilder
that represents a command structure. This is meant to reduce the challenge of lining up hard to see parenthesis and chained commands in your code.
Add mavenCentral()
to the repositories section of your build.gradle
Add the dependency via implementation "com.oroarmor:json-to-brigadier:1.0.0
The API has two main methods to use. JsonToBrigadier.parse(Path)
and JsonToBrigadier.parse(String)
. The first method takes in a path to the file, and then calls the second with the contents of that file. They both return an ArgumentBuilder
object representing the command structure specified by the JSON string or file.
The method given in executes
must have the signature public static int
.
Example:
{
"name": "test",
"argument" : {
"type": "brigadier:literal"
},
"children": [
{
"name": "value",
"argument": {
"type": "brigadier:integer",
"min": 0,
"max": 1
},
"executes": "com.example.TestSimpleCommand::runCommand"
}
]
}
ArgumentBuilder<T, S> builder = JsonToBrigadier.parse(json);
is the same as writing
ArgumentBuilder<T, S> builder = literal("test")
.then(argument("value", integer(0, 1))
.executes(TestSimpleCommand::runCommand));
This library only supports the default argument types in Brigadier. For a library that supports Minecraft's arguments, look at <To be created>.
Type | Name | Parameters | Example |
---|---|---|---|
Boolean | "brigadier:boolean" |
None | "argument": { "type": "brigadier:boolean"} |
Float | "brigadier:float" |
min , max . min is required for max
|
"argument": { "type": "brigadier:float", "min": 1} |
Double | "brigadier:double" |
min , max . min is required for max
|
"argument": { "type": "brigadier:double", "min": 0, "max": 100} |
Long | "brigadier:long" |
min , max . min is required for max
|
"argument": { "type": "brigadier:long"} |
Integer | "brigadier:integer" |
min , max . min is required for max
|
"argument": { "type": "brigadier:integer"} |
String | "brigadier:string" |
string_type : word , greedy , string . Defaults to string
|
"argument": { "type": "brigadier:string"} |
Literal | "brigadier:literal" |
None | "argument": { "type": "brigadier:literal"} |