0

I have an adventure map with a say command that activates after a certain mob is killed. This can be problematic, because if you die while fighting the mob, it sends you to a town, and automatically makes the difficulty set to peaceful. This in turn kills the mob and sets off the say command without the player actually killing it. With this situation, can I make a say command that is only seen by players that are within a certain radius? I do not want a say command that is only set off when a player enters a certain radius.

1 Answer 1

2

You can't specify a radius for the command /say. You should learn json and use /tellraw instead. If you want to send the message to everyone within a radius of 100 blocks, do /tellraw @a[r=100].

Basic JSON formatting: /tellraw @a[r=100] {text:"Hello world!"}

With colours: /tellraw @a[r=100] {text:"Hello world!",color:"aqua"}

These colours have different names than wool colours, for example cyan is dark_aqua. These names can be found on the Minecraft wiki here.

You can do lots more with JSON than you can do with /say. Check out this awesome json generator: https://www.minecraftjson.com/

2
  • You could also just leave the JSON if you don't need anything like colours or click events, for example /tellraw @a[r=100] "Hello everyone that is in a radius of 100 blocks from me!" Feb 29, 2016 at 17:08
  • 1
    1.13 syntax: distance=..100 instead of r=100
    – pppery
    Aug 20, 2018 at 22:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .