Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with syntax #105

Open
LeonardoCT opened this issue Mar 29, 2024 · 4 comments
Open

Problem with syntax #105

LeonardoCT opened this issue Mar 29, 2024 · 4 comments

Comments

@LeonardoCT
Copy link

Hello, when i run
/summon minecraft:cow 147 75 -64 {CustomName:""CoolCow""}
From the normal console it works but when i try:
mcrcon -H localhost -p my_password "summon minecraft:cow 147 75 -64 {CustomName:""NomePersonalizzato""}"
Only a normal cow spawns without the CustomName
i think the problem is that mcrcon is not correctly parsing the data

@Tiiffi
Copy link
Owner

Tiiffi commented Mar 29, 2024

Hi,

Mcrcon is not really parsing the input so I guess the terminal is decimating the quotation marks from the input.

Try escaping the quotes like this: "summon minecraft:cow 147 75 -64 {CustomName:\"NomePersonalizzato\"}"

@LeonardoCT
Copy link
Author

Hi, thanks for the fast reply, still no custom name, just a normal cow spawns:
image

This is the exact command i used:
mcrcon.exe -H [redacted] -p [redacted] "summon minecraft:cow 150 73 -49 {CustomName:"NomePersonalizzato"}"

i even tried some variations:
mcrcon.exe -H [redacted] -p [redacted] "summon zombie 150 73 -49 {CustomName:'[{"text":"NomePersonalizzato"}]'}"
,,,But this is what i get:
image
And i still get a normal zombie

i would like to mention that the second command executes just fine from in-game command window (chat) and a custom entity with the right name spawns, i think there must be a problem when mcrcon sends the comand to the server.

@LeonardoCT
Copy link
Author

Since you mentioned that the terminal could be decimating the input i will try to experiment with something, another note:
the main goal of what im doing is to integrate with (Mix it up!) a software that allows the execution of commands upon custom twitch event (like a follower or a donation) and do some in-game stuff, i can do stuff like get the player coordinates (i had to make a little parser to make it digest the entity data and ONLY get the coordinates) and spawn an entity (or a block) and it wold be very nice to summon the entity with the name of the follower

@LeonardoCT
Copy link
Author

Ok, i found the solution, i escaped both quotations in the second iteration and got it to work with this:
mcrcon.exe -H [redacted] -p [redacted] "summon zombie 150 73 -49 {CustomName:'[{"text":"NomePersonalizzato"}]'}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants