/worldborder Command in Minecraft Java Edition

Control the Size of the World Border

Java EditionWorld & BlocksPermission: Level 2

The /worldborder command lets you control the outer boundary of your world in Minecraft Java Edition. With it, you can change the size of the border, move its center coordinates, and adjust how much damage players take outside the boundary.

Server admins and map makers often use this command to keep players inside a set play area or to create shrinking arenas for survival games. Because it requires permission level 2, you must be an operator or have cheats turned on in single-player to run it.

Syntax (Java 26.3, 8 forms)

  1. /worldborder add <distance> [<time>]
  2. /worldborder center <pos>
  3. /worldborder damage amount <damagePerBlock>
  4. /worldborder damage buffer <distance>
  5. /worldborder get
  6. /worldborder set <distance> [<time>]
  7. /worldborder warning distance <distance>
  8. /worldborder warning time <time>

The forms you will use most

/worldborder set <distance> [<time>]
Sets the world border width to a specific distance, optionally moving it over a set amount of time.
/worldborder add <distance> [<time>]
Increases or decreases the current world border width by a certain distance, either right away or over a duration.
/worldborder center <pos>
Moves the center point of the world border to new X and Z coordinates.
/worldborder get
Displays the current width of the world border.
/worldborder damage amount <damagePerBlock>
Changes the amount of damage players take per block outside the border buffer.
/worldborder damage buffer <distance>
Sets the safe distance outside the world border before players begin taking damage.
/worldborder warning distance <distance>
Sets how many blocks away from the world border a player must be to see the warning tint.
/worldborder warning time <time>
Sets the warning time for when a shrinking world border is about to reach the player's location.

Arguments

ArgumentTypeWhat it means
<distance>decimal number
-59999968.0 to 59999968.0
A distance value that accepts a decimal from -59999968.0 to 59999968.0 for border sizes, a decimal of at least 0.0 for the damage buffer, or a whole number of at least 0 for the warning distance.
<time>time
at least 0
A time duration of at least 0, written as a number of ticks like 100, seconds like 5s, or days like 2d.
<pos>x z positionTwo coordinates representing the X and Z position for the center of the world border.
<damagePerBlock>decimal number
at least 0.0
A decimal number of at least 0.0 that defines the damage amount per block, such as 0.5.
<distance>decimal number
at least 0.0
A distance value that accepts a decimal from -59999968.0 to 59999968.0 for border sizes, a decimal of at least 0.0 for the damage buffer, or a whole number of at least 0 for the warning distance.
<distance>whole number
at least 0
A distance value that accepts a decimal from -59999968.0 to 59999968.0 for border sizes, a decimal of at least 0.0 for the damage buffer, or a whole number of at least 0 for the warning distance.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.13 Already in the game in 1.13, the oldest Java version we track.

Tips

Common mistakes

Java vs Bedrock

The /worldborder command is only available in Minecraft Java Edition. Bedrock Edition has no command with this name.

FAQ

How do I shrink the world border slowly?

You can shrink the border over time by adding a duration to the end of the set or add command, such as /worldborder add -100.0 30s to reduce the width by 100 blocks over 30 seconds.

Who has permission to use the /worldborder command?

You need permission level 2 to run this command, which means you must be a server operator or have cheats enabled in your single-player world.

Can I use the /worldborder command in Bedrock Edition?

No, Bedrock Edition does not have a /worldborder command. This command is only in Java Edition, where it has been available since at least version 1.13 through 26.3.

Related commands

/clone/difficulty/fill/fillbiome/forceload/gamerule/locate/place/seed/setblock/setworldspawn/time/waypoint/weather