The command: /inputraw <rawJSON>
This works similarly to the /tellraw command with a huge difference:
It parses the input out to plain text then attempts to run it as if it was entered as a command.
For example you could execute the command as a player:
/inputraw [{"text":"give @s minecraft:player_head{SkullOwner:\""},{"selector":"@s"},{"text":"\"}"}]
and the output command would be:
give @s minecraft:player_head{SkullOwner:"SelectedPlayer"}
This would allow you to give ANY player their own player head using automated commands!
Not only that, but you could also insert scoreboards and player names into text. for one example:
/inputraw [{"text":"give @s minecraft:cod{display:{Name:\"\\\"Big Fish\\\"\",Lore:[\"Fish Caught by: "},{"selector":"@s"},{"text":"\",\"Fish Length: "},{"score":{"name":"@s","objective":"fishing_score"}},{"text":"\"]}}"}]
If the player's fishing_score scoreboard=172 results in:
give @s minecraft:cod{display:{Name:"\"Big Fish\"",Lore:["Fish Caught by: SelectedPlayer","Fish Length: 172"]}}
Or giving "Cod" item:
Big Fish
Lore: Fish Caught by: SelectedPlayer
Fish Length: 172
And this is only scratching the surface of what it could do:
Want to insert multiple scores automatically for auto generated clone and fill commands? You can do that!
Want to make incrementing bossbars to autogenerate a new one for every boss? You can do that!
Want to make self-writing commands using a combination of scoreboards and custom named entities? You can do that!
The possibilities would be near endless.
Please sign in to leave a comment.
4 Comments