Can anyone tell me what is causing problems in yaml syntax?
If anyone knows yaml syntax well enough to tell me what is wrong with this please let me know.
33 Replies
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close
!close
!solved
!answered
Requested by torrentstaff#0
(I wasn't the one generating this command I just want to help the guy prepare for a scavenger hunt on my server)
What error are you getting when you run the command? I guess you're trying to put this in a command block?
Should’ve been more specific my bad. I’m trying to register a mycommand alias with this and I’m struggling to get it to work. In yaml checker it says something about bad separator or paragraph indent. I don’t really understand it
Just from the looks it seems you don't escape the quotes correctly if what you posted is some value in some config file it probably can only read:
'/give @p written_book{pages:['
thats json not yaml
It's a json command inside of a yaml config
Probably
also shouldnt they make sure they run /minecraft:give
Only if they have essentials/plugin that's overriding the give command but generally a good idea yeah
id probs run that through a json beautifier tho munecraft isnt known for its good json syntax
or atleast it complains alot
List all your plugins
Honestly if you got essential make a kit for the book
It's way simpler and users can run the cmd
you need to use minecraft:give
also uh where is this command?
What plugin are you even using for the CMD anyways
if its in mycmd use placeholders not @ p
^^
Ahhh good tip didn’t even think about that, will do
Mycommand
^^
I’m not entirely sure that’s true I set it up in the essentials config so it doesn’t override commands like that
Like for example:
oh you disabled the give command from essentials?
I believe there’s a config line in essentials that’s like command overrides or something, I set that to false
thats still essentials it looks like
well no i know it is
It is but you don’t have to type Minecraft:command or essentials:command
vanilla minecraft give command doesnt show prefixes
At least with how I’ve had it set up
but it uses essentials version of give
:-:
Oh well I guess that makes sense
I would think whether using essentials or Minecraft in mycommand wouldn’t make a different with the run_command type since it supports other plugin commands
But nonetheless I’ll try it with Minecraft:give
you never had to do essentials:command
issue is just essentials by default overrides the give command and doesnt support neither @ p nor the same json syntax
This kinda went over my head ngl
Oh I see
Ok that makes perfect sense I’ll change it to Minecraft:give
And the placeholder
Just to be safe
Imagine this
- "give torrent stick 1 named "kB stick" "
The last bit is likely to throw an error as it got quotation
I give up for now my mental health is suffering from this I just can’t get run_command types to work
The docs don’t say very much about it just give examples
And the tutorials on YouTube suck
Closing for now guys thx for the help
!close
post closed!
The post/thread has been closed!
Requested by torrentstaff#0