
Command
/worldborder
Shows or changes the world border: its width, center, the damage it deals and the warning shown to players near it.
| /worldborder (add <distance>|set <distance>) [<time>] |
| /worldborder center <pos> |
| /worldborder damage (amount <damagePerBlock>|buffer <distance>) |
| /worldborder get |
| /worldborder warning (distance <distance>|time <time>) |
| Argument | Kind of value | What to type |
|---|---|---|
| <distance> | Decimal number | For set: the new width of the border in blocks, from 1 to 59999968. For add: the number of blocks to add to the width, negative to shrink. For damage buffer: the safe distance outside the border in blocks, 0 or more. For warning distance: a whole number of blocks, 0 or more. From -6e+07 to 6e+07. |
| <time> | Time | For set and add: how long the change takes, in ticks or with a unit (t, s, d); 0 or left out means at once. For warning time: the warning time in ticks or with a unit, 0 or more. At least 0. |
| <pos> | Flat position | The new center of the border as X and Z. Accepts ~ for relative coordinates. Each must be within 29999984 blocks of 0. |
| <damagePerBlock> | Decimal number | Damage per second for each block beyond the buffer. 0 or more. Default 0.2. At least 0. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Server operators, players in a singleplayer or LAN world with cheats enabled, the server console, command blocks and functions. |
| Result | Each sub-command reports the new setting. Returned values: get returns the current width in blocks, rounded; set and add return the change in width in blocks; center returns 0; damage amount, damage buffer, warning distance and warning time return the value that was set, as a whole number (warning time in ticks). |
| get | /worldborder get shows how wide the border currently is, in blocks. |
| set | /worldborder set <distance> [time] sets the width of the border, measured from side to side. The width must be between 1 and 59999968 blocks. With a time, the border grows or shrinks gradually over that time; without one it changes at once. |
| add | /worldborder add <distance> [time] makes the border wider by the given number of blocks, or narrower with a negative number. The resulting width must still be between 1 and 59999968 blocks. If the border is already moving, the time given is added to the time that is left. |
| Time unit | The time for set and add, and the warning time, are in ticks (20 ticks = 1 second), or a number with a unit: t for ticks, s for seconds, d for in-game days. The game reports them in seconds. |
| center | /worldborder center <pos> moves the middle of the border to the given X and Z. Neither coordinate may be farther than 29999984 blocks from 0. |
| damage amount | /worldborder damage amount <damagePerBlock> sets the damage per second a player takes for each block they are beyond the buffer outside the border. Minimum 0. Default 0.2. |
| damage buffer | /worldborder damage buffer <distance> sets how many blocks outside the border a player can go before taking damage. Minimum 0. Default 5. |
| warning distance | /worldborder warning distance <distance> sets how close to the border, in blocks, a player must be for the screen warning to appear. Minimum 0. Default 5. |
| warning time | /worldborder warning time <time> makes the warning appear when a shrinking border will reach the player within that time. Minimum 0. Default 300 ticks (15 seconds). |
| Nothing changed | Every setting fails with a "Nothing changed" message if it is given the value it already has. |
| Dimension | The command acts on the world border of the dimension it is run in. |
| Default size | A new world border is 59999968 blocks wide and centered on X 0, Z 0. |
/worldborder getShows the current width of the world border.
/worldborder set 1000Sets the world border to 1000 blocks wide at once.
/worldborder set 500 60sShrinks or grows the border to 500 blocks wide over 60 seconds.
/worldborder add 100 200Makes the border 100 blocks wider over 200 ticks (10 seconds).
/worldborder center 0 0Centers the border on X 0, Z 0.
/worldborder center ~ ~Centers the border on your current position.
/worldborder damage amount 1Sets the border damage to 1 per second for each block beyond the buffer.
/worldborder damage buffer 10Lets players go 10 blocks past the border before they take damage.
/worldborder warning distance 20Shows the border warning to players within 20 blocks of the border.
/worldborder warning time 30sSets the border warning time to 30 seconds (600 ticks).

