Add so you can do
/variable set [name] [data: JSON type]
/variable get [name]
/execute if variable [name] = [value]
/variable operation [name] [operation: - + : *] [value]
Variables can be used in commands with %[name]% or $[name] and when the command runs it will replace the variable with its content
HTTP Reqs:
*requestOptions are headers, by default it includes these: {UserAgent: "Minecraft HTTP", mc-pos: [cords of the entity that runned the command], mc-name: [username of the entity], mc-version: [mc version]}
/http get [url] [requestOptions] - Return the content in chat
/http post [url] [body] [requestOptions]
/http custom [method] [url] [body] [requestOptions]
/execute if http [method] [url] [requestOptions] = [responseType: Response, Code] [value]
JSON Text: {variable: [name], http: {url: [url], method: [method], body: [body], options: [requestOptions], response: [responseType]}
Http Requests are runned from the server or via proxy with a gamerule. If the command block is chain it will await for the request to end before continuing with the chain, that can be removed by adding await: false to the requestOptions.
THIS IS A REPOST BECOUSE MOJANG MADE A CATEGORY FOR THIS AFTER I POSTED IT
Please sign in to leave a comment.
1 Comments