RPG-esque Area Names on Entry in Minecraft

So the title command lets you put a fancy thing across people's screens like you might see in some RPG. I'd like to use this as a way to give names for areas in my adventure map- for example, they walk into a region and it says "X Dungeon" or "Town Name" on the screen. Problem is, I'm not 100% sure how to accomplish this. I'm pretty sure I'd have to use the scoreboard, but I'd appreciate assistance from anyone more sure of this than I.
Best Answer
As I mentioned in my comment, this is possible with the use of the /title
command. The syntax is:
Setting the times: title <player> times <fade in> <stay> <fade out>
This command will determine the times which the title will be displayed for. fade in
, fade out
, and stay
are all measured in ticks (1/20 of a second). Example:
/title @a times 10 60 10
will set the display time of everyone to 1/2 second fade in, 3 second display, and 1/2 second fade out.
Note: This command needs to be run before the title command is run.
To display a title: /title <player> title <contents>
Once again, player
is a player name or @ commands. contents
is the message to be displayed in raw JSON format. Example:
/title @a[r=10] title {text:"This is a title",color:green,bold:true}
will display the title This is a title
in bold green text.
To implement this into your situation, simply create a command block on a loop at the entrance to each area. Insert the title command into it. Also create another command block on a loop with the time command in it so that the timing is right. This can be anywhere in the map.
The JSON in the title command can be a bit confusing, so I recommend this generator to help you out. It will generate the time and title command.
The Minecraft Wiki has a complete reference on how to use the title command, including subtitles etc.
I hope this is what you are looking for!
Pictures about "RPG-esque Area Names on Entry in Minecraft"



How do you make a title in Minecraft?
To enable command blocks on your Minecraft server:If Minecraft Had Turn-Based Combat
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Max Vakhtbovych, Maria Orlova, Dayvison de Oliveira Silva, Erik Mclean