TransWikia.com

How do I send a custom Tellraw message based on the player in a certain location in Minecraft

Arqade Asked by FriezKing on January 7, 2021

For a Minecraft map I’m making, I want public messages to be sent when a player steps on a certain pressure plate or walks through a specific door, and for the message to say who exactly did it. Also, I want it to be able to handle multiple players in the same spot and does its job respectively.

For example, if a person walks into a door, it says,

"their username has walked through the door."

I’m currently using

/tellraw @a {"text":"","color":"yellow","extra":[{"selector":"@p[distance=3]"},{"text":" has walked through the door."}]}

but it doesn’t seem to work, and rather responds with,

" has walked through the door."

Any thoughts?

One Answer

Minecraft uses dots to specify bigger than and smaller than when using tags such as distance=n.

  • 2 dots in front (distance=..n) stands for smaller than n.
  • 2 dots at the end (distance=n..) stands for bigger than n.

Additionally, both terms can be used in one tag (e.g.: distance=y..n stands for bigger than y and smaller than n.).

To answer your question, change distance=3 to distance=..3, problem solved.

Answered by ahmettrPro on January 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP