Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/worldborder

Command

/worldborder

Shows or changes the world border: its width, center, the damage it deals and the warning shown to players near it.

Syntax

/worldborder (add <distance>|set <distance>) [<time>]
/worldborder center <pos>
/worldborder damage (amount <damagePerBlock>|buffer <distance>)
/worldborder get
/worldborder warning (distance <distance>|time <time>)

Arguments

ArgumentKind of valueWhat to type
<distance>Decimal numberFor 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>TimeFor 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 positionThe new center of the border as X and Z. Accepts ~ for relative coordinates. Each must be within 29999984 blocks of 0.
<damagePerBlock>Decimal numberDamage per second for each block beyond the buffer. 0 or more. Default 0.2. At least 0.

Details

Permission level2: operators, worlds with cheats on, command blocks and functions
Works inServer operators, players in a singleplayer or LAN world with cheats enabled, the server console, command blocks and functions.
ResultEach 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 unitThe 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 changedEvery setting fails with a "Nothing changed" message if it is given the value it already has.
DimensionThe command acts on the world border of the dimension it is run in.
Default sizeA new world border is 59999968 blocks wide and centered on X 0, Z 0.

Examples

/worldborder get

Shows the current width of the world border.

/worldborder set 1000

Sets the world border to 1000 blocks wide at once.

/worldborder set 500 60s

Shrinks or grows the border to 500 blocks wide over 60 seconds.

/worldborder add 100 200

Makes the border 100 blocks wider over 200 ticks (10 seconds).

/worldborder center 0 0

Centers the border on X 0, Z 0.

/worldborder center ~ ~

Centers the border on your current position.

/worldborder damage amount 1

Sets the border damage to 1 per second for each block beyond the buffer.

/worldborder damage buffer 10

Lets players go 10 blocks past the border before they take damage.

/worldborder warning distance 20

Shows the border warning to players within 20 blocks of the border.

/worldborder warning time 30s

Sets the border warning time to 30 seconds (600 ticks).

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)