#Using lang strings in /summon commands?

1 messages · Page 1 of 1 (latest)

ripe frigate
#

Hey lovely community, great to touch base with you all!

I'm wondering if, within a /summon command, it's possible to use a string from a lang file to name the entity I'm summoning, rather than directly inserting the name into the command itself.

Essentially, given that this project involves entities with different names in multiple languages, it would be way more efficient if I could call upon the relevant string for the entity's name directly in the /summon command. Otherwise, I'd have to manually update each command for every language I'm working with.

Similarly, I'm wanted to know if the same can be done within a @e selector when using the name=X parameter.

Thanks a ton for your help, and have an absolutely fantastic day! 💪

reef holly
# ripe frigate Hey lovely community, great to touch base with you all! I'm wondering if, withi...

I don't believe accessing lang files like that is possible, but I do know a solution for identifying the entities based on @e with names in different languages. Instead of using the name=X parameter though, you would have to use the tag=X parameter. Decide on an ID for each entity (or maybe 1 translation of the name you are using) and use that in place of the name=X parameter.
Instead of commands you could try custom entities that automatically set their name to a lang file value, but I'm not sure if it would work. I hope this helps you

ripe frigate
#

Hi there! Thanks for your reply! Yes, tagging was my first choice, but since I have a lots of entities roaming around the map, it'll take a lot of time to tag them all