Json To Brigadier

Allows JSON files to be converted into brigadier commands
Alternatives To Json To Brigadier
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Adventure521392 days ago6April 17, 202086mitJava
A user-interface library, formerly known as text, for Minecraft: Java Edition
Bridge.305
3 months ago36gpl-3.0TypeScript
Minecraft Add-on Editor | We strive to provide the best development experience possible
Editor102
a month ago189gpl-3.0TypeScript
Next generation of bridge., the Minecraft Add-On editor
Templateplugin80
22 days agogpl-3.0Java
A template for creating minecraft plugin from 1.8 to 1.19
Flowupdater69
2 months ago13July 01, 2022gpl-3.0Java
The free and open source solution to update Minecraft.
Vscode Bedrock Development Extension58
2 days ago2bsd-3-clauseJSON
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 Configs53
10 days ago4mitJava
Simple Java/POJO config library written with love and Lombok
Modulelauncher.re43
3 months ago1mitC#
Cross-platform Minecraft Launcher library for .NET
Mcwine38
a day agomitJSON
Enhances the vanilla experience with optimization, accessibility & compatibility using complex modification.
Minecraft Assets33
6 months ago3
Provide minecraft assets along with json files that help to use them.
Alternatives To Json To Brigadier
Select To Compare


Alternative Project Comparisons
Readme

Json To Brigadier

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.

Usage

Inclusion

Add mavenCentral() to the repositories section of your build.gradle

Add the dependency via implementation "com.oroarmor:json-to-brigadier:1.0.0

Code

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));

Supported Types

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"}
Popular Json Projects
Popular Minecraft Projects
Popular Data Formats Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Json
Minecraft