How To Make Custom Welcome Messages In Vanilla Minecraft?

I was wondering how to make your own custom welcome messages in Minecraft using command blocks. I want it to replace the regular welcome message to make it look more professional. I am really looking forward to releasing my server in a couple of days so I want to make a good first impression. Thank you!


There is no way to alter the default welcome messages afaik. But you can add your own custom messages after that, using the title command or a custom tellraw message.

To set this up, you'll first need a objective to detect when a player has left the game (run once):

 /scoreboard objectives add hasLeft stat.leaveGame 

This will be on 1 as soon as they log back in. you can then use @a[score_hasLeft_min=1] to target those players.

e.g.

/title @a[score_hasLeft_min=1] title ["",{"text":"Welcome back!"}]
/execute @a[score_hasLeft_min=1] ~ ~ ~ /tellraw @a ["",{"text":"Welcome back "},{"selector":"@a[score_hasLeft_min=1]"},{"text":" to the server!"}]

these commands will
1. display "Welcome back!" as a title to the player that just logged in and
2. display "Welcome back [player] to the server!" in chat, visible for everyone.

make sure to set the score to 0 after you displayed your messages to prevent the chat from being spammed:

/scoreboard players set @a[score_hasLeft_min=1] hasLeft 0

EDIT: The Commands above will only provide a "welcome back" to players that came back for the second time. To target players that log in for the first time the easiest way would be something like this:

/execute @a[tag=!firstJoin] ~ ~ ~ /tellraw @a ["",{"text":"A warm welcome to "},{"selector":"@a[score_hasLeft_min=1]"},{"text":" who joined for the first time!"}]
/scoreboard players tag @a[tag=!firstJoin] add firstJoin

Since players join for the first time, they won't have the firstJoin tag. you can execute the tellraw (or whatever) off of that, then add the tag to display the message only the very first time they join the server.