Commands/worldborder

From Minecraft Wiki
Jump to: navigation, search
Information icon.svg
This feature is exclusive to Java Edition.
worldborder
Restrictions

Operator

First introduced

Java Edition 1.8 (14w17a)

These commands control the world border.

Syntax[edit]

The command has eight variations, each with different arguments:

  • worldborder add <distance> [<time>] (increases the world border diameter)
  • worldborder center <pos> (recenters the world boundary)
  • worldborder damage amount <damagePerBlock> (specifies the world border damage rate)
  • worldborder damage buffer <distance> (specifies the world border damage buffer distance)
  • worldborder get (returns the world border diameter)
  • worldborder set <distance> [<time>] (sets the world border diameter)
  • worldborder warning distance <distance> (specifies the world border warning distance)
  • worldborder warning time <time> (specifies the world border warning time)

Arguments[edit]

<distance>

Specifies a distance in blocks:
  • add – Specifies the number of blocks to add to the world border diameter.
  • damage buffer – Specifies the distance outside the world buffer a player must be before they start taking damage. Must be at least 0.0. Initially set to 5.0.
  • set – Specifies the new diameter for the world border. Must be between 1.0 and 60,000,000 (inclusive, without the commas).
  • warning distance – Specifies the distance from the world border at which players begins to see a visual warning of the world border's proximity. Must be at least 0. Initially set to 5.

<time>

Specifies a time in seconds:
  • add – Specifies the number of seconds it should take for the world border to move from its current diameter to the new diameter. Must be at least 0. If not specified, defaults to 0.
  • set – Specifies the number of seconds it should take for the world border to move from its current diameter to the new diameter. Must be at least 0. If not specified, defaults to 0.
  • warning time – Specifies the number of seconds that a player begins to see a visual warning before a moving world border passes their position. Must be at least 0. Initially set to 15.

<pos>

Specifies the horizontal coordinates of the world border's center in form of<x> <z>. Must be between -30,000,000 and 30,000,000 (inclusive, without the commas). May use tilde and caret notation to specify coordinates relative to the command's execution.

<damagePerBlock>

Specifies the damage a player takes per second per block past the world border buffer. For example, if <damagePerBlock> is 0.1, a player 5 blocks outside the world border buffer takes 0.5 damage per second (damage less than half a heart might not change the visual health display, but still accumulates). Must be at least 0.0. Initially set to 0.2.

Result[edit]

Fails if the arguments are not specified correctly.

On success:

  • add – The world border begins changing its diameter by the specified amount. If <distance> is positive, the world border turns green and start increasing; if negative, the world border turns red and start decreasing. If <time> is 0 or unspecified, the change occurs immediately; otherwise the change proceeds at a rate of (distance/2)/time blocks per second.
  • center – The center of the world border immediately moves to the specified coordinates.
  • damage amount – Sets the world border damage amount to the specified value. Any player outside the world border buffer takes this amount of damage per second per block past the world border buffer distance.
  • damage buffer – Sets the world border buffer distance to the specified value. Players won't take damage until they move past this distance from the world border.
  • get – Shows the current world border diameter in the chat.
  • set – The world border begins changing its diameter to the specified value. If <distance> is bigger than the current diameter, the world border turns green and start increasing; if smaller, the world border turns red and start decreasing. If <time> is 0 or unspecified, the change occurs immediately; otherwise the change proceeds at a rate of ((distance-<current diameter>)/2)/time blocks per second.
  • warning distance – Sets the world border warning distance to the specified value.
  • warning time – Sets the world border warning time to the specified value.

History[edit]

Java Edition
1.814w17aAdded /worldborder.
14w19aAdded /worldborder damage.
Added /worldborder warning.
14w26aAdded /worldborder add.
14w29aAdded /worldborder get.