how to prevent the commandblock from saying [@] [duplicate]

Solution 1:

There are 2 ways you can change that:

Anvil Method

You can rename the command block in an anvil to change what is used as it's "username". For example, put the command block in an anvil and set the name to 'Julie' and then use this command:

/say You are doing it wrong.

Shows this in chat:

[Julie] You are doing it wrong.

Just note that /say has brackets instead of angle brackets (<Julie>) and doesn't respect chat manager plugin settings.

/tellraw Method

There is a command called /tellraw which you can use to send completely custom messages. Here is the usage:

/tellraw <player selector> <JSON message data>

A very simple example is:

/tellraw @a "<Julie> You are doing it wrong."

These messages can be formatted, but that is beyond the scope of this answer.

Solution 2:

/say always displays the name of the announcer. You will want to use /tellraw instead, which allows you direct control over the message and formatting using a JSON object:

/tellraw @a {"text":"Julie > You are doing it wrong.","color":"red"}