The new World Border command can be extremely helpful, especially on servers. It allows the player to set a border around the world that is unpassable. If a player is caught outside it, they can enter from the outside, but cannot break or place blocks outside of it.
Setting a World Border
The only command involved with World Borders is /worldborder. It has several options.
First, to set a world border, one must do
/worldborder set <diameter> [time in seconds]
The time in seconds represents how quickly a world border will expand. Many servers implement this.
For example, if one wants to make a World Border that is 64 blocks by 64 blocks and does not expand, they would do
/worldborder set 64
To find out how large a world border is, do:
This will return the size of the world border.
Be very sure to know that the world border will, by default, be generated around the coordinates 0 X, 0 Z. Moving it will be covered below.
Moving a Border
It is possible to move a World Border entirely, protecting a whole new section of land. This can be accomplished by doing:
/worldborder center <x> <z>
This states where the world border's new center will be.
World Border warning and damage capabilities
When a player is near to exiting a World Border, their screen will show a red haze around it. To set the distance this red haze appears at, do:
/worldborder warning distance <blocks>
A world border will damage players that touch it, like an electrical field. To set this amount of damage, do:
/worldborder damage amount <amount of damage>
This will specify the amount of damage done to players touching the border.